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
This commit is contained in:
fgfemperor 2010-01-16 13:07:03 +00:00
parent 93bb45aaf2
commit e203c80c5d
1 changed files with 5 additions and 7 deletions

View File

@ -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