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
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
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
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
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");
}

View File

@ -40,7 +40,7 @@ void ConfigDialog::LoadFile()
Console::Print("LoadFile()\n");
IniFile file;
file.Load("WiimoteMovement.ini");
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
for (int i = 1; i < (RECORDING_ROWS + 1); i++)
{
@ -82,7 +82,7 @@ void ConfigDialog::SaveFile()
Console::Print("SaveFile\n");
IniFile file;
file.Load("WiimoteMovement.ini");
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
for(int i = 1; i < (RECORDING_ROWS + 1); i++)
{
@ -114,7 +114,7 @@ void ConfigDialog::SaveFile()
file.Set(SaveName.c_str(), "PlaybackSpeed", m_RecordPlayBackSpeed[i]->GetSelection());
}
file.Save("WiimoteMovement.ini");
file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini");
Console::Print("SaveFile()\n");
}
/////////////////////////////
@ -360,7 +360,7 @@ void ConfigDialog::ConvertToString()
{
// Load ini file
IniFile file;
file.Load("WiimoteMovement.ini");
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
std::string TmpStr = "", TmpIR = "", TmpTime = "";
for (int i = 0; i < m_vRecording.size(); i++)
@ -422,7 +422,7 @@ void ConfigDialog::ConvertToString()
m_RecordPlayBackSpeed[m_iRecordTo]->SetSelection(3);
}
file.Save("WiimoteMovement.ini");
file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini");
Console::Print("Save recording to WiimoteMovement.ini\n");
}

View File

@ -233,7 +233,7 @@ void LoadRecordedMovements()
Console::Print("LoadRecordedMovements()\n");
IniFile file;
file.Load("WiimoteMovement.ini");
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
for(int i = 0; i < RECORDING_ROWS; i++)
{