Cocoa Port: Oops! Fix a compiling issue caused by commit 5d3e53d.

This commit is contained in:
rogerman 2018-10-22 13:01:42 -07:00
parent 5d3e53d804
commit 0ef9543f87
2 changed files with 11 additions and 13 deletions

View File

@ -89,7 +89,7 @@ ClientExecutionControl::ClientExecutionControl()
_settingsPending.enableFirmwareBoot = false; _settingsPending.enableFirmwareBoot = false;
_settingsPending.enableDebugConsole = false; _settingsPending.enableDebugConsole = false;
_settingsPending.enableEnsataEmulation = false; _settingsPending.enableEnsataEmulation = false;
_settingsPending.wifiMode = WifiCommInterfaceID_AdHoc; _settingsPending.wifiEmulationMode = WifiEmulationLevel_Off;
_settingsPending.wifiBridgeDeviceIndex = 0; _settingsPending.wifiBridgeDeviceIndex = 0;
_settingsPending.enableExecutionSpeedLimiter = true; _settingsPending.enableExecutionSpeedLimiter = true;
@ -565,19 +565,19 @@ void ClientExecutionControl::SetEnableEnsataEmulation(bool enable)
pthread_mutex_unlock(&this->_mutexSettingsPendingOnNDSExec); pthread_mutex_unlock(&this->_mutexSettingsPendingOnNDSExec);
} }
int ClientExecutionControl::GetWifiMode() int ClientExecutionControl::GetWifiEmulationMode()
{ {
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset); pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
const int wifiMode = this->_settingsPending.wifiMode; const int wifiEmulationMode = this->_settingsPending.wifiEmulationMode;
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset); pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
return wifiMode; return wifiEmulationMode;
} }
void ClientExecutionControl::SetWifiMode(int wifiMode) void ClientExecutionControl::SetWifiEmulationMode(int wifiEmulationMode)
{ {
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset); pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
this->_settingsPending.wifiMode = wifiMode; this->_settingsPending.wifiEmulationMode = wifiEmulationMode;
this->_newSettingsPendingOnReset = true; this->_newSettingsPendingOnReset = true;
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset); pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
@ -972,7 +972,7 @@ void ClientExecutionControl::ApplySettingsOnReset()
this->_settingsApplied.enableExternalFirmware = this->_settingsPending.enableExternalFirmware; this->_settingsApplied.enableExternalFirmware = this->_settingsPending.enableExternalFirmware;
this->_settingsApplied.enableFirmwareBoot = this->_settingsPending.enableFirmwareBoot; this->_settingsApplied.enableFirmwareBoot = this->_settingsPending.enableFirmwareBoot;
this->_settingsApplied.wifiMode = this->_settingsPending.wifiMode; this->_settingsApplied.wifiEmulationMode = this->_settingsPending.wifiEmulationMode;
this->_settingsApplied.wifiBridgeDeviceIndex = this->_settingsPending.wifiBridgeDeviceIndex; this->_settingsApplied.wifiBridgeDeviceIndex = this->_settingsPending.wifiBridgeDeviceIndex;
this->_settingsApplied.wifiIP4Address = this->_settingsPending.wifiIP4Address; this->_settingsApplied.wifiIP4Address = this->_settingsPending.wifiIP4Address;
@ -997,11 +997,9 @@ void ClientExecutionControl::ApplySettingsOnReset()
//CommonSettings.UseExtFirmwareSettings = this->_settingsApplied.enableExternalFirmware; //CommonSettings.UseExtFirmwareSettings = this->_settingsApplied.enableExternalFirmware;
CommonSettings.UseExtFirmwareSettings = false; CommonSettings.UseExtFirmwareSettings = false;
CommonSettings.BootFromFirmware = this->_settingsApplied.enableFirmwareBoot; CommonSettings.BootFromFirmware = this->_settingsApplied.enableFirmwareBoot;
CommonSettings.wifi.mode = (WifiCommInterfaceID)this->_settingsApplied.wifiMode;
CommonSettings.wifi.infraBridgeAdapter = this->_settingsApplied.wifiBridgeDeviceIndex; CommonSettings.wifi.infraBridgeAdapter = this->_settingsApplied.wifiBridgeDeviceIndex;
wifiHandler->SetIP4Address(this->_settingsApplied.wifiIP4Address); wifiHandler->SetEmulationLevel((WifiEmulationLevel)this->_settingsApplied.wifiEmulationMode);
wifiHandler->SetCommInterfaceID((WifiCommInterfaceID)this->_settingsApplied.wifiMode);
wifiHandler->SetBridgeDeviceIndex(this->_settingsApplied.wifiBridgeDeviceIndex); wifiHandler->SetBridgeDeviceIndex(this->_settingsApplied.wifiBridgeDeviceIndex);
if (this->_settingsApplied.filePathARM9BIOS.length() == 0) if (this->_settingsApplied.filePathARM9BIOS.length() == 0)

View File

@ -95,7 +95,7 @@ struct ClientExecutionControlSettings
bool enableDebugConsole; bool enableDebugConsole;
bool enableEnsataEmulation; bool enableEnsataEmulation;
int wifiMode; int wifiEmulationMode;
int wifiBridgeDeviceIndex; int wifiBridgeDeviceIndex;
uint32_t wifiIP4Address; uint32_t wifiIP4Address;
@ -305,8 +305,8 @@ public:
bool GetEnableEnsataEmulation(); bool GetEnableEnsataEmulation();
void SetEnableEnsataEmulation(bool enable); void SetEnableEnsataEmulation(bool enable);
int GetWifiMode(); int GetWifiEmulationMode();
void SetWifiMode(int wifiMode); void SetWifiEmulationMode(int wifiEmulationMode);
int GetWifiBridgeDeviceIndex(); int GetWifiBridgeDeviceIndex();
void SetWifiBridgeDeviceIndex(int wifiBridgeDeviceIndex); void SetWifiBridgeDeviceIndex(int wifiBridgeDeviceIndex);