Replace scoped enum used for WifiEmulationLevel with unscoped enum for code compatibility with older compilers.
This commit is contained in:
parent
259ca8579f
commit
cf5ed05cab
|
@ -1336,7 +1336,7 @@ void Sequencer::init()
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
#ifdef EXPERIMENTAL_WIFI_COMM
|
||||||
if(wifiEmulationLevel > WifiEmulationLevel::Off)
|
if(wifiEmulationLevel > WifiEmulationLevel_Off)
|
||||||
{
|
{
|
||||||
wifi.enabled = true;
|
wifi.enabled = true;
|
||||||
wifi.timestamp = kWifiCycles;
|
wifi.timestamp = kWifiCycles;
|
||||||
|
@ -1672,7 +1672,7 @@ u64 Sequencer::findNext()
|
||||||
if(readslot1.isEnabled()) next = _fast_min(next,readslot1.next());
|
if(readslot1.isEnabled()) next = _fast_min(next,readslot1.next());
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
#ifdef EXPERIMENTAL_WIFI_COMM
|
||||||
if (wifiEmulationLevel > WifiEmulationLevel::Off) next = _fast_min(next,wifi.next());
|
if (wifiEmulationLevel > WifiEmulationLevel_Off) next = _fast_min(next,wifi.next());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define test(X,Y) if(dma_##X##_##Y .isEnabled()) next = _fast_min(next,dma_##X##_##Y .next());
|
#define test(X,Y) if(dma_##X##_##Y .isEnabled()) next = _fast_min(next,dma_##X##_##Y .next());
|
||||||
|
@ -1730,7 +1730,7 @@ void Sequencer::execHardware()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
#ifdef EXPERIMENTAL_WIFI_COMM
|
||||||
if(wifiEmulationLevel > WifiEmulationLevel::Off)
|
if(wifiEmulationLevel > WifiEmulationLevel_Off)
|
||||||
{
|
{
|
||||||
if(wifi.isTriggered())
|
if(wifi.isTriggered())
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,11 +217,11 @@ enum NDS_CONSOLE_TYPE
|
||||||
NDS_CONSOLE_TYPE_DSI = 0xFE
|
NDS_CONSOLE_TYPE_DSI = 0xFE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class WifiEmulationLevel
|
enum WifiEmulationLevel
|
||||||
{
|
{
|
||||||
Off = 0,
|
WifiEmulationLevel_Off = 0,
|
||||||
Normal = 10000,
|
WifiEmulationLevel_Normal = 10000,
|
||||||
Compatibility = 65535,
|
WifiEmulationLevel_Compatibility = 65535,
|
||||||
};
|
};
|
||||||
extern WifiEmulationLevel wifiEmulationLevel;
|
extern WifiEmulationLevel wifiEmulationLevel;
|
||||||
|
|
||||||
|
|
|
@ -3331,12 +3331,12 @@ int _main()
|
||||||
if (GetPrivateProfileBool("Wifi", "Enabled", false, IniName))
|
if (GetPrivateProfileBool("Wifi", "Enabled", false, IniName))
|
||||||
{
|
{
|
||||||
if (GetPrivateProfileBool("Wifi", "Compatibility Mode", false, IniName))
|
if (GetPrivateProfileBool("Wifi", "Compatibility Mode", false, IniName))
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Compatibility;
|
wifiEmulationLevel = WifiEmulationLevel_Compatibility;
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Normal;
|
wifiEmulationLevel = WifiEmulationLevel_Normal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Off;
|
wifiEmulationLevel = WifiEmulationLevel_Off;
|
||||||
|
|
||||||
CommonSettings.wifi.mode = GetPrivateProfileInt("Wifi", "Mode", 0, IniName);
|
CommonSettings.wifi.mode = GetPrivateProfileInt("Wifi", "Mode", 0, IniName);
|
||||||
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
||||||
|
@ -7076,10 +7076,10 @@ LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
int i;
|
int i;
|
||||||
HWND cur;
|
HWND cur;
|
||||||
|
|
||||||
if (wifiEmulationLevel > WifiEmulationLevel::Off)
|
if (wifiEmulationLevel > WifiEmulationLevel_Off)
|
||||||
{
|
{
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, true);
|
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, true);
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, wifiEmulationLevel == WifiEmulationLevel::Compatibility);
|
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, wifiEmulationLevel == WifiEmulationLevel_Compatibility);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -7143,12 +7143,12 @@ LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED))
|
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED))
|
||||||
{
|
{
|
||||||
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT))
|
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT))
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Compatibility;
|
wifiEmulationLevel = WifiEmulationLevel_Compatibility;
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Normal;
|
wifiEmulationLevel = WifiEmulationLevel_Normal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel::Off;
|
wifiEmulationLevel = WifiEmulationLevel_Off;
|
||||||
|
|
||||||
WritePrivateProfileBool("Wifi", "Enabled", IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED), IniName);
|
WritePrivateProfileBool("Wifi", "Enabled", IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED), IniName);
|
||||||
WritePrivateProfileBool("Wifi", "Compatibility Mode", IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT), IniName);
|
WritePrivateProfileBool("Wifi", "Compatibility Mode", IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT), IniName);
|
||||||
|
|
Loading…
Reference in New Issue