From cf4c7a5d8c3c29d8e4b126ec0756d0261549852f Mon Sep 17 00:00:00 2001 From: The Dax Date: Wed, 4 Dec 2013 17:28:20 -0500 Subject: [PATCH] Fix bug where networking option wasn't saved to the ini file, and default to false. If it's on by default, Peace Walker and other games are broken for now. --- Core/Config.cpp | 4 ++-- Core/HLE/sceNet.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 1a72216055..53d7259927 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -312,7 +312,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { } IniFile::Section *network = iniFile.GetOrCreateSection("Network"); - network->Get("EnableWlan", &bEnableWlan, true); + network->Get("EnableWlan", &bEnableWlan, false); IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam"); #ifndef ANDROID @@ -550,7 +550,7 @@ void Config::Save() { control->Set("AnalogStickScale", fAnalogStickScale); IniFile::Section *network = iniFile.GetOrCreateSection("Network"); - network->Set("EnableWlan", &bEnableWlan, true); + network->Set("EnableWlan", bEnableWlan); IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam"); pspConfig->Set("PSPModel", iPSPModel); diff --git a/Core/HLE/sceNet.cpp b/Core/HLE/sceNet.cpp index a0aa6f4d62..db845942e0 100644 --- a/Core/HLE/sceNet.cpp +++ b/Core/HLE/sceNet.cpp @@ -148,13 +148,13 @@ u32 sceNetGetLocalEtherAddr(u32 addrAddr) { } u32 sceWlanDevIsPowerOn() { - DEBUG_LOG(SCENET, "UNTESTED 0=sceWlanDevIsPowerOn()"); - return 1; + DEBUG_LOG(SCENET, "UNTESTED sceWlanDevIsPowerOn()"); + return g_Config.bEnableWlan ? 1 : 0; } u32 sceWlanGetSwitchState() { DEBUG_LOG(SCENET, "UNTESTED sceWlanGetSwitchState()"); - return 1; + return g_Config.bEnableWlan ? 1 : 0; } // Probably a void function, but often returns a useful value.