Add built-in AdhocServer option

This commit is contained in:
sum2012 2014-08-23 20:35:05 +08:00 committed by Henrik Rydgard
parent 589cf551a0
commit 21f3d0ecf2
4 changed files with 4 additions and 4 deletions

View File

@ -571,7 +571,7 @@ static ConfigSetting controlSettings[] = {
static ConfigSetting networkSettings[] = {
ConfigSetting("EnableWlan", &g_Config.bEnableWlan, false, true, true),
ConfigSetting("EnableAdhocServer", &g_Config.bEnableAdhocServer, false, true, true),
ConfigSetting(false),
};

View File

@ -311,6 +311,7 @@ public:
// Networking
bool bEnableWlan;
bool bEnableAdhocServer;
int iWlanAdhocChannel;
bool bWlanPowerSave;

View File

@ -204,8 +204,7 @@ u32 sceNetAdhocInit() {
}
// Create built-in AdhocServer Thread
// TODO: It might be better to have it's own config (ie. g_Config.bEnableAdhocServer)
if (g_Config.bEnableWlan) {
if (g_Config.bEnableAdhocServer) {
//_status = 1;
adhocServerRunning = true;
adhocServerThread = std::thread(proAdhocServerThread, SERVER_PORT);

View File

@ -487,7 +487,7 @@ void GameSettingsScreen::CreateViews() {
#else
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.proAdhocServer, s->T("Change proAdhocServer Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeproAdhocServerAddress);
#endif
systemSettings->Add(new CheckBox(&g_Config.bEnableAdhocServer, s->T("Enable built-in PRO Adhoc Server", "Enable built-in PRO Adhoc Server")));
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.sMACAddress, s->T("Change Mac Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMacAddress);
//#ifndef ANDROID