Emulated Wiimote: Moved the IR Pointer settings to a separate 'IR Pointer.ini' file. Also moved the 'WiimoteMovement.ini' file to the /User/Config dir.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2440 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-26 00:35:17 +00:00
parent 4bcb9b5834
commit ae81c01449
3 changed files with 33 additions and 22 deletions

View File

@ -68,14 +68,6 @@ void Config::Load(bool ChangePad)
iniFile.Get("Real", "AccNunNeutralY", &iAccNunNeutralY, 0);
iniFile.Get("Real", "AccNunNeutralZ", &iAccNunNeutralZ, 0);
// Load the IR cursor settings if it's avaliable, if not load the default settings
std::string TmpSection;
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
iniFile.Get(TmpSection.c_str(), "IRLeft", &iIRLeft, LEFT);
iniFile.Get(TmpSection.c_str(), "IRTop", &iIRTop, TOP);
iniFile.Get(TmpSection.c_str(), "IRWidth", &iIRWidth, RIGHT - LEFT);
iniFile.Get(TmpSection.c_str(), "IRHeight", &iIRHeight, BOTTOM - TOP);
// Default controls
int WmA = 65, WmB = 66,
Wm1 = 49, Wm2 = 50,
@ -199,6 +191,18 @@ void Config::Load(bool ChangePad)
}
// =============================
// ==================================================================
// Load the IR cursor settings if it's avaliable, if not load the default settings
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
iniFile.Load(FULL_CONFIG_DIR "IR Pointer.ini");
std::string TmpSection;
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
iniFile.Get(TmpSection.c_str(), "IRLeft", &iIRLeft, LEFT);
iniFile.Get(TmpSection.c_str(), "IRTop", &iIRTop, TOP);
iniFile.Get(TmpSection.c_str(), "IRWidth", &iIRWidth, RIGHT - LEFT);
iniFile.Get(TmpSection.c_str(), "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 */
@ -231,14 +235,6 @@ void Config::Save(int Slot)
iniFile.Set("Real", "AccNunNeutralY", iAccNunNeutralY);
iniFile.Set("Real", "AccNunNeutralZ", iAccNunNeutralZ);
// Save the IR cursor settings if it's avaliable, if not save the default settings
std::string TmpSection;
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
iniFile.Set(TmpSection.c_str(), "IRLeft", iIRLeft);
iniFile.Set(TmpSection.c_str(), "IRTop", iIRTop);
iniFile.Set(TmpSection.c_str(), "IRWidth", iIRWidth);
iniFile.Set(TmpSection.c_str(), "IRHeight", iIRHeight);
for (int i = 0; i < 1; i++)
{
// ==================================================================
@ -341,5 +337,20 @@ void Config::Save(int Slot)
}
iniFile.Save(FULL_CONFIG_DIR "Wiimote.ini");
// ==================================================================
// Save the IR cursor settings if it's avaliable, if not save the default settings
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
iniFile.Load(FULL_CONFIG_DIR "IR Pointer.ini");
std::string TmpSection;
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
iniFile.Set(TmpSection.c_str(), "IRLeft", iIRLeft);
iniFile.Set(TmpSection.c_str(), "IRTop", iIRTop);
iniFile.Set(TmpSection.c_str(), "IRWidth", iIRWidth);
iniFile.Set(TmpSection.c_str(), "IRHeight", iIRHeight);
iniFile.Save(FULL_CONFIG_DIR "IR Pointer.ini");
// =============================
// Logging
Console::Print("Save()\n");
}