Added UI to change WLAN Channel.

Currently Ridge Racer 2 doesn't works with Auto channel (TODO: Making sure sceUtilityGetSystemParamInt doesn't returns channel 0 when connected to a network for Ridge Racer 2 to works with Auto channel)
This commit is contained in:
ANR2ME authored and Henrik Rydgård committed 2020-07-22 16:46:39 +02:00
1 parent d0045947f1
commit 8daf2ff66e
5 files changed
+20 -7

No files matched your search

+6
View File
@@ -692,6 +692,12 @@ void GameSettingsScreen::CreateViews() {
networkingSettings->Add(new CheckBox(&g_Config.bEnableAdhocServer, n->T("Enable built-in PRO Adhoc Server", "Enable built-in PRO Adhoc Server")));
networkingSettings->Add(new CheckBox(&g_Config.bEnableUPnP, n->T("Enable UPnP", "Enable UPnP (need a few seconds to detect)")));
networkingSettings->Add(new ChoiceWithValueDisplay(&g_Config.sMACAddress, n->T("Change Mac Address"), (const char *)nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMacAddress);
static const char* wlanChannels[] = { "Auto", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" };
auto wlanChannelChoice = networkingSettings->Add(new PopupMultiChoice(&g_Config.iWlanAdhocChannel, gr->T("WLAN Channel"), wlanChannels, 0, ARRAY_SIZE(wlanChannels), gr->GetName(), screenManager()));
for (int i = 0; i < 4; i++) {
wlanChannelChoice->HideChoice(i+2);
wlanChannelChoice->HideChoice(i+7);
}
networkingSettings->Add(new PopupSliderChoice(&g_Config.iPortOffset, 0, 60000, n->T("Port offset", "Port offset(0 = PSP compatibility)"), 100, screenManager()));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 1, 15000, n->T("Minimum Timeout", "Minimum Timeout (override low latency communication in milliseconds)"), 100, screenManager()));