From e203c80c5de431b676d21f07c178a1191e57f45a Mon Sep 17 00:00:00 2001 From: fgfemperor Date: Sat, 16 Jan 2010 13:07:03 +0000 Subject: [PATCH] Fix an Issue that made the IR Pointer values sometimes not to be loaded from the config. More precisely, if you booted a game before opening the config panel, they'd all go to the default values... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4852 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_Wiimote/Src/Config.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Plugins/Plugin_Wiimote/Src/Config.cpp b/Source/Plugins/Plugin_Wiimote/Src/Config.cpp index f42499066f..b05658437d 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/Config.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/Config.cpp @@ -325,14 +325,12 @@ void Config::Load() iniFile.Get(SectionName, "TriggerType", &WiiMoteEmu::WiiMapping[i].TriggerType, 0); } - // Load the IR cursor settings if it's avaliable for the GameId, if not load the default settings + // Load the IR cursor settings iniFile.Load(FULL_CONFIG_DIR "IR Pointer.ini"); - char TmpSection[32]; - sprintf(TmpSection, "%s", g_ISOId ? Hex2Ascii(g_ISOId).c_str() : "Default"); - iniFile.Get(TmpSection, "IRLeft", &iIRLeft, LEFT); - iniFile.Get(TmpSection, "IRTop", &iIRTop, TOP); - iniFile.Get(TmpSection, "IRWidth", &iIRWidth, RIGHT - LEFT); - iniFile.Get(TmpSection, "IRHeight", &iIRHeight, BOTTOM - TOP); + iniFile.Get("Default", "IRLeft", &iIRLeft, LEFT); + iniFile.Get("Default", "IRTop", &iIRTop, TOP); + iniFile.Get("Default", "IRWidth", &iIRWidth, RIGHT - LEFT); + iniFile.Get("Default", "IRHeight", &iIRHeight, BOTTOM - TOP); // Load a few screen settings to. If these are added to the DirectX plugin it's probably // better to place them in the main Dolphin.ini file