From cec4b6551273cf3f13ffee8acd9e81b97f3a17f0 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Tue, 28 Jul 2009 16:20:54 +0000 Subject: [PATCH] revert part of r3896 bad decision to move all ini paths to common git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3897 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CommonPaths.h | 35 +++---------------- Source/Core/Core/Src/ConfigManager.cpp | 2 +- .../Core/DebuggerWX/Src/BreakpointWindow.cpp | 8 ++--- Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp | 6 ++-- Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp | 8 +++-- .../Plugin_PadSimple/Src/PadSimple.cpp | 6 ++-- Source/Plugins/Plugin_VideoDX9/Src/Config.cpp | 6 ++-- Source/Plugins/Plugin_VideoOGL/Src/Config.cpp | 6 ++-- Source/Plugins/Plugin_Wiimote/Src/Config.cpp | 14 ++++---- .../Plugin_Wiimote/Src/ConfigRecording.cpp | 10 +++--- Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp | 2 +- Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp | 6 ++-- 12 files changed, 43 insertions(+), 66 deletions(-) diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h index acba16ccd4..12b521c02d 100644 --- a/Source/Core/Common/Src/CommonPaths.h +++ b/Source/Core/Common/Src/CommonPaths.h @@ -82,24 +82,11 @@ #define WII_SYS_DIR "Wii" // Filenames -#define DOLPHIN_CONFIG "Dolphin.ini" -#define DEBUGGER_CONFIG "Debugger.ini" -#define BREAKPOINT_CONFIG "BreakPoints.ini" -#define MEMCHECKS_CONFIG "MemoryChecks.ini" -#define LOGGER_CONFIG "Logger.ini" - -#define DX9_CONFIG "gfx_dx9.ini" -#define OPENGL_CONFIG "gfx_opengl.ini" -#define DSPHLE_CONFIG "DSP.ini" -#define DSPLLE_CONFIG "DSPLLE.ini" -#define NJOY_CONFIG "nJoy.ini" -#define PSIMPLE_CONFIG "pad.ini" -#define WM_CONFIG "Wiimote.ini" -#define WM_IR_CONFIG "IR Pointer.ini" -#define WM_MOVEMENT_CONFIG "WiimoteMovement.ini" - -#define TOTALDB "totaldb.dsy" -#define MAIN_LOG "dolphin.log" +#define DOLPHIN_CONFIG "Dolphin.ini" +#define DEBUGGER_CONFIG "Debugger.ini" +#define LOGGER_CONFIG "Logger.ini" +#define TOTALDB "totaldb.dsy" +#define MAIN_LOG "dolphin.log" #define DEFAULT_GFX_PLUGIN PLUGIN_PREFIX "Plugin_VideoOGL" PLUGIN_SUFFIX #define DEFAULT_DSP_PLUGIN PLUGIN_PREFIX "Plugin_DSP_HLE" PLUGIN_SUFFIX @@ -167,18 +154,6 @@ #define CONFIG_FILE FULL_CONFIG_DIR DOLPHIN_CONFIG #define DEBUGGER_CONFIG_FILE FULL_CONFIG_DIR DEBUGGER_CONFIG #define LOGGER_CONFIG_FILE FULL_CONFIG_DIR LOGGER_CONFIG -#define BREAKPOINT_CONFIG_FILE FULL_GAMECONFIG_DIR BREAKPOINT_CONFIG -#define MEMCHECKS_CONFIG_FILE FULL_GAMECONFIG_DIR MEMCHECKS_CONFIG - -#define DX9_CONFIG_FILE FULL_CONFIG_DIR DX9_CONFIG -#define OPENGL_CONFIG_FILE FULL_CONFIG_DIR OPENGL_CONFIG -#define DSPHLE_CONFIG_FILE FULL_CONFIG_DIR DSPHLE_CONFIG -#define DSPLLE_CONFIG_FILE FULL_CONFIG_DIR DSPLLE_CONFIG -#define NJOY_CONFIG_FILE FULL_CONFIG_DIR NJOY_CONFIG -#define PSIMPLE_CONFIG_FILE FULL_CONFIG_DIR PSIMPLE_CONFIG -#define WM_CONFIG_FILE FULL_CONFIG_DIR WM_CONFIG -#define WM_IR_CONFIG_FILE FULL_CONFIG_DIR WM_IR_CONFIG -#define WM_MOVEMENT_CONFIG_FILE FULL_CONFIG_DIR WM_MOVEMENT_CONFIG #define TOTALDB_FILE FULL_SYSDATA_DIR TOTALDB #define MAINRAM_DUMP_FILE FULL_DUMP_DIR RAM_DUMP diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 4ee17b37da..35de9e4465 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -258,7 +258,7 @@ void SConfig::LoadSettingsHLE() { IniFile ini; // - ini.Load(DSPHLE_CONFIG_FILE); + ini.Load(FULL_CONFIG_DIR "DSP.ini"); ini.Get("Config", "EnableRE0AudioFix", &m_EnableRE0Fix, false); // RE0 Hack } diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp index 11170ff6f8..dd895119b4 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp @@ -226,7 +226,7 @@ CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) { // load ini IniFile ini; - std::string filename = std::string(BREAKPOINT_CONFIG_FILE); + std::string filename = std::string(FULL_GAMECONFIG_DIR "BreakPoints.ini"); if (ini.Load(filename.c_str())) // check if there is any file there { @@ -252,7 +252,7 @@ CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) } else { - wxMessageBox(_T("You have no "BREAKPOINT_CONFIG_FILE " file")); + wxMessageBox(_T("You have no GameIni/BreakPoints.ini file")); } } @@ -275,7 +275,7 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) { // load ini IniFile ini; - std::string filename = std::string(MEMCHECKS_CONFIG_FILE); + std::string filename = std::string(FULL_GAMECONFIG_DIR "MemoryChecks.ini"); if (ini.Load(filename.c_str())) { @@ -354,7 +354,7 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) } else { - wxMessageBox(_T("You have no " MEMCHECKS_CONFIG_FILE " file")); + wxMessageBox(_T("You have no " FULL_GAMECONFIG_DIR "MemoryChecks.ini file")); } } // ================= diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp index 10a67b9789..38585b949e 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp @@ -32,7 +32,7 @@ void CConfig::Load() { // first load defaults IniFile file; - file.Load(DSPHLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "DSP.ini"); file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true); // Sound Settings file.Get("Config", "EnableRE0AudioFix", &m_EnableRE0Fix, false); // RE0 Hack ac_Config.Load(file); @@ -41,12 +41,12 @@ void CConfig::Load() void CConfig::Save() { IniFile file; - file.Load(DSPHLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "DSP.ini"); file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio); // Sound Settings file.Set("Config", "EnableRE0AudioFix", m_EnableRE0Fix); // RE0 Hack ac_Config.Set(file); - file.Save(DSPHLE_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR "DSP.ini"); } void CConfig::GameIniLoad() { diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp index de2ad03d7d..a4c44bd34f 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp @@ -20,6 +20,8 @@ #include "Config.h" #include "AudioCommon.h" +#define LLE_CONFIG_FILE "DSPLLE.ini" + CConfig g_Config; CConfig::CConfig() @@ -31,15 +33,15 @@ void CConfig::Load() { // first load defaults IniFile file; - file.Load(DSPLLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR LLE_CONFIG_FILE); ac_Config.Load(file); } void CConfig::Save() { IniFile file; - file.Load(DSPLLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR LLE_CONFIG_FILE); ac_Config.Set(file); - file.Save(DSPLLE_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR LLE_CONFIG_FILE); } diff --git a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp index 954b9d3022..6d0e03d5fa 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp +++ b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp @@ -911,7 +911,7 @@ void LoadConfig() }; #endif IniFile file; - file.Load(PSIMPLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "pad.ini"); for(int i = 0; i < 4; i++) { @@ -946,7 +946,7 @@ void LoadConfig() void SaveConfig() { IniFile file; - file.Load(PSIMPLE_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "pad.ini"); for(int i = 0; i < 4; i++) { @@ -969,5 +969,5 @@ void SaveConfig() file.Set(SectionName, controlNames[x], pad[i].keyForControl[x]); } } - file.Save(PSIMPLE_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR "pad.ini"); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Config.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Config.cpp index c380740cb8..d614870fc6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Config.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Config.cpp @@ -27,7 +27,7 @@ Config::Config() void Config::Load() { IniFile iniFile; - iniFile.Load(DX9_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "gfx_dx9.ini"); iniFile.Get("Hardware", "Adapter", &iAdapter, 0); iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0); iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0); @@ -57,7 +57,7 @@ void Config::Load() void Config::Save() { IniFile iniFile; - iniFile.Load(DX9_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "gfx_dx9.ini"); iniFile.Set("Hardware", "Adapter", iAdapter); iniFile.Set("Hardware", "WindowedRes", iWindowedRes); iniFile.Set("Hardware", "FullscreenRes", iFSResolution); @@ -79,5 +79,5 @@ void Config::Save() iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering); iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso); - iniFile.Save(DX9_CONFIG_FILE); + iniFile.Save(FULL_CONFIG_DIR "gfx_dx9.ini"); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp index 82d1837ed2..58ef8941eb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp @@ -31,7 +31,7 @@ void Config::Load() { std::string temp; IniFile iniFile; - iniFile.Load(OPENGL_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "gfx_opengl.ini"); // get resolution iniFile.Get("Hardware", "WindowedRes", &temp, "640x480"); @@ -129,7 +129,7 @@ void Config::GameIniLoad() void Config::Save() { IniFile iniFile; - iniFile.Load(OPENGL_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "gfx_opengl.ini"); iniFile.Set("Hardware", "WindowedRes", iInternalRes); iniFile.Set("Hardware", "FullscreenRes", iFSResolution); iniFile.Set("Hardware", "Fullscreen", bFullscreen); @@ -175,5 +175,5 @@ void Config::Save() iniFile.Set("Hacks", "EFBToTextureEnable", bCopyEFBToRAM); iniFile.Set("Hacks", "ProjectionHack", iPhackvalue); - iniFile.Save(OPENGL_CONFIG_FILE); + iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini"); } diff --git a/Source/Plugins/Plugin_Wiimote/Src/Config.cpp b/Source/Plugins/Plugin_Wiimote/Src/Config.cpp index 7923d9f356..4d80df4ca5 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/Config.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/Config.cpp @@ -216,7 +216,7 @@ void Config::Load(bool ChangePad) { std::string temp; IniFile iniFile; - iniFile.Load(WM_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "Wiimote.ini"); // General iniFile.Get("Settings", "SidewaysDPad", &bSidewaysDPad, false); @@ -296,7 +296,7 @@ void Config::Load(bool ChangePad) iniFile.Get(joySectionName.c_str(), "PitchInvert", &WiiMoteEmu::PadMapping[i].bPitchInvert, false); } // Load the IR cursor settings if it's avaliable for the GameId, if not load the default settings - iniFile.Load(WM_IR_CONFIG_FILE); + 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); @@ -307,7 +307,7 @@ void Config::Load(bool ChangePad) // 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 - iniFile.Load(OPENGL_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "gfx_opengl.ini"); iniFile.Get("Settings", "KeepAR_4_3", &bKeepAR43, false); iniFile.Get("Settings", "KeepAR_16_9", &bKeepAR169, false); iniFile.Get("Settings", "Crop", &bCrop, false); @@ -318,7 +318,7 @@ void Config::Load(bool ChangePad) void Config::Save(int Slot) { IniFile iniFile; - iniFile.Load(WM_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "Wiimote.ini"); iniFile.Set("Settings", "SidewaysDPad", bSidewaysDPad); iniFile.Set("Settings", "ExtensionConnected", iExtensionConnected); @@ -395,17 +395,17 @@ void Config::Save(int Slot) iniFile.Set(joySectionName.c_str(), "PitchInvert", WiiMoteEmu::PadMapping[i].bPitchInvert); } - iniFile.Save(WM_CONFIG_FILE); + iniFile.Save(FULL_CONFIG_DIR "Wiimote.ini"); // Save the IR cursor settings if it's avaliable for the GameId, if not save the default settings - iniFile.Load(WM_IR_CONFIG_FILE); + iniFile.Load(FULL_CONFIG_DIR "IR Pointer.ini"); char TmpSection[32]; sprintf(TmpSection, "%s", g_ISOId ? Hex2Ascii(g_ISOId).c_str() : "Default"); iniFile.Set(TmpSection, "IRLeft", iIRLeft); iniFile.Set(TmpSection, "IRTop", iIRTop); iniFile.Set(TmpSection, "IRWidth", iIRWidth); iniFile.Set(TmpSection, "IRHeight", iIRHeight); - iniFile.Save(WM_IR_CONFIG_FILE); + iniFile.Save(FULL_CONFIG_DIR "IR Pointer.ini"); //INFO_LOG(CONSOLE, "Save()\n"); } \ No newline at end of file diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp index 4c3b313371..44e3f3e2db 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigRecording.cpp @@ -32,7 +32,7 @@ void WiimoteRecordingConfigDialog::LoadFile() INFO_LOG(CONSOLE, "LoadFile()\n"); IniFile file; - file.Load(WM_MOVEMENT_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini"); for (int i = 1; i < (RECORDING_ROWS + 1); i++) { @@ -75,7 +75,7 @@ void WiimoteRecordingConfigDialog::SaveFile() INFO_LOG(CONSOLE, "SaveFile\n"); IniFile file; - file.Load(WM_MOVEMENT_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini"); for(int i = 1; i < (RECORDING_ROWS + 1); i++) { @@ -107,7 +107,7 @@ void WiimoteRecordingConfigDialog::SaveFile() file.Set(SaveName.c_str(), "PlaybackSpeed", m_RecordPlayBackSpeed[i]->GetSelection()); } - file.Save(WM_MOVEMENT_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini"); INFO_LOG(CONSOLE, "SaveFile()\n"); } @@ -338,7 +338,7 @@ void WiimoteRecordingConfigDialog::CreateGUIControlsRecording() void WiimoteRecordingConfigDialog::ConvertToString() { IniFile file; - file.Load(WM_MOVEMENT_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini"); std::string TmpStr = "", TmpIR = "", TmpTime = ""; for (int i = 0; i < (int)m_vRecording.size(); i++) @@ -402,7 +402,7 @@ void WiimoteRecordingConfigDialog::ConvertToString() m_RecordPlayBackSpeed[m_iRecordTo]->SetSelection(3); } - file.Save(WM_MOVEMENT_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini"); INFO_LOG(CONSOLE, "Save recording to WiimoteMovement.ini\n"); } diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp index ef159db970..e88b45caa5 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp @@ -186,7 +186,7 @@ void LoadRecordedMovements() INFO_LOG(WII_IPC_WIIMOTE, "LoadRecordedMovements()\n"); IniFile file; - file.Load(WM_MOVEMENT_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini"); for(int i = 0; i < RECORDING_ROWS; i++) { diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp index 521fcd4e2f..2933e26fc2 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp @@ -102,7 +102,7 @@ void Config::Save(int Slot) // Load ini file IniFile file; - file.Load(NJOY_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "nJoy.ini"); // ================================================================== // Global settings @@ -189,7 +189,7 @@ void Config::Save(int Slot) INFO_LOG(CONSOLE, "%i: Save: %i\n", 0, PadMapping[0].halfpress); - file.Save(NJOY_CONFIG_FILE); + file.Save(FULL_CONFIG_DIR "nJoy.ini"); } // Load settings from file @@ -201,7 +201,7 @@ void Config::Load(bool ChangePad, bool ChangeSaveByID) // Load file IniFile file; - file.Load(NJOY_CONFIG_FILE); + file.Load(FULL_CONFIG_DIR "nJoy.ini"); bool Tmp; // Tmp storage // ==================================================================