diff --git a/Core/Config.cpp b/Core/Config.cpp index 137194c475..313b7ecdc7 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -339,6 +339,7 @@ static ConfigSetting generalSettings[] = { ConfigSetting("ReportingHost", &g_Config.sReportHost, "default"), ConfigSetting("AutoSaveSymbolMap", &g_Config.bAutoSaveSymbolMap, false, true, true), ConfigSetting("CacheFullIsoInRam", &g_Config.bCacheFullIsoInRam, false, true, true), + ConfigSetting("RemoteISOPort", &g_Config.iRemoteISOPort, 0, true, false), #ifdef ANDROID ConfigSetting("ScreenRotation", &g_Config.iScreenRotation, 1), @@ -356,6 +357,7 @@ static ConfigSetting generalSettings[] = { ConfigSetting("PauseWhenMinimized", &g_Config.bPauseWhenMinimized, false, true, true), ConfigSetting("DumpDecryptedEboots", &g_Config.bDumpDecryptedEboot, false, true, true), ConfigSetting("FullscreenOnDoubleclick", &g_Config.bFullscreenOnDoubleclick, true, false, false), + ConfigSetting(false), }; @@ -510,7 +512,8 @@ static ConfigSetting graphicsSettings[] = { ReportedConfigSetting("FragmentTestCache", &g_Config.bFragmentTestCache, true, true, true), ConfigSetting("GfxDebugOutput", &g_Config.bGfxDebugOutput, false, false, false), - ConfigSetting(false), + + ConfigSetting(false), }; static ConfigSetting soundSettings[] = { @@ -666,6 +669,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), }; diff --git a/Core/Config.h b/Core/Config.h index 6a2016997b..1a3afc10cc 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -138,6 +138,7 @@ public: int iLockedCPUSpeed; bool bAutoSaveSymbolMap; bool bCacheFullIsoInRam; + int iRemoteISOPort; int iScreenRotation; // The rotation angle of the PPSSPP UI. Only supported on Android and possibly other mobile platforms. int iInternalScreenRotation; // The internal screen rotation angle. Useful for vertical SHMUPs and similar. diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index d9bca543cd..0e9082c72a 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -155,9 +155,12 @@ static void ExecuteServer() { http->RegisterHandler(pair.first.c_str(), handler); } - http->Listen(0); + if (!http->Listen(g_Config.iRemoteISOPort)) { + http->Listen(0); + } UpdateStatus(ServerStatus::RUNNING); + g_Config.iRemoteISOPort = http->Port(); RegisterServer(http->Port()); double lastRegister = real_time_now(); while (RetrieveStatus() == ServerStatus::RUNNING) {