diff --git a/Source/Core/Core/Src/ActionReplay.h b/Source/Core/Core/Src/ActionReplay.h index ac2bb7bd2a..e1d4619065 100644 --- a/Source/Core/Core/Src/ActionReplay.h +++ b/Source/Core/Core/Src/ActionReplay.h @@ -28,8 +28,8 @@ struct ARCode void RunAllActive(); bool RunCode(const ARCode &arcode); -void LoadCodes(IniFile &globalIni, IniFile &localIni, bool forceLoad); -void LoadCodes(std::vector &_arCodes, IniFile &globalIni, IniFile &localIni); +void LoadCodes(IniFile &globalini, IniFile &localIni, bool forceLoad); +void LoadCodes(std::vector &_arCodes, IniFile &globalini, IniFile &localIni); size_t GetCodeListSize(); ARCode GetARCode(size_t index); void SetARCode_IsActive(bool active, size_t index); diff --git a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp index 7266fe1deb..f06dd5bcb0 100644 --- a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp @@ -149,8 +149,7 @@ bool CBoot::EmulatedBS2_GC() PC = PowerPC::ppcState.gpr[3]; // Load patches - std::string gameID = VolumeHandler::GetVolume()->GetUniqueID(); - PatchEngine::LoadPatches(gameID.c_str()); + PatchEngine::LoadPatches(); PowerPC::ppcState.DebugCount = 0; @@ -422,7 +421,7 @@ bool CBoot::EmulatedBS2_Wii() // Load patches and run startup patches std::string gameID = VolumeHandler::GetVolume()->GetUniqueID(); - PatchEngine::LoadPatches(gameID.c_str()); + PatchEngine::LoadPatches(); // return PC = PowerPC::ppcState.gpr[3]; diff --git a/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp index 519db4a92b..42d1b72708 100644 --- a/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp +++ b/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp @@ -118,7 +118,7 @@ bool CBoot::Boot_WiiWAD(const char* _pFilename) // Load patches and run startup patches const DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(_pFilename); if (pVolume != NULL) - PatchEngine::LoadPatches(pVolume->GetUniqueID().c_str()); + PatchEngine::LoadPatches(); return true; } diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index 532fca8ff2..a2e7688ca9 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -75,14 +75,17 @@ bool BootCore(const std::string& _rFilename) // Load game specific settings std::string unique_id = StartUp.GetUniqueID(); + std::string revision_specific = StartUp.m_strRevisionSpecificUniqueID; StartUp.m_strGameIniDefault = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + unique_id + ".ini"; + if (revision_specific != "") + StartUp.m_strGameIniDefaultRevisionSpecific = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + revision_specific + ".ini"; + else + StartUp.m_strGameIniDefaultRevisionSpecific = ""; StartUp.m_strGameIniLocal = File::GetUserPath(D_GAMESETTINGS_IDX) + unique_id + ".ini"; if (unique_id.size() == 6) { - IniFile game_ini; - game_ini.Load(StartUp.m_strGameIniDefault); - game_ini.Load(StartUp.m_strGameIniLocal, true); + IniFile game_ini = StartUp.LoadGameIni(); config_cache.valid = true; config_cache.bCPUThread = StartUp.bCPUThread; diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 4974635ea4..a47af4bd05 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -204,9 +204,7 @@ bool Init() g_aspect_wide = _CoreParameter.bWii; if (g_aspect_wide) { - IniFile gameIni; - gameIni.Load(_CoreParameter.m_strGameIniDefault.c_str()); - gameIni.Load(_CoreParameter.m_strGameIniLocal.c_str(), true); + IniFile gameIni = _CoreParameter.LoadGameIni(); gameIni.Get("Wii", "Widescreen", &g_aspect_wide, !!SConfig::GetInstance().m_SYSCONF-> GetData("IPL.AR")); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 8c64462e02..c22f5a15ba 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -147,6 +147,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2) } m_strName = pVolume->GetName(); m_strUniqueID = pVolume->GetUniqueID(); + m_strRevisionSpecificUniqueID = pVolume->GetRevisionSpecificUniqueID(); // Check if we have a Wii disc bWii = DiscIO::IsVolumeWiiDisc(pVolume); @@ -390,3 +391,29 @@ void SCoreStartupParameter::CheckMemcardPath(std::string& memcardPath, std::stri } } } + +IniFile SCoreStartupParameter::LoadGameIni() const +{ + IniFile game_ini; + game_ini.Load(m_strGameIniDefault); + if (m_strGameIniDefaultRevisionSpecific != "") + game_ini.Load(m_strGameIniDefaultRevisionSpecific, true); + game_ini.Load(m_strGameIniLocal, true); + return game_ini; +} + +IniFile SCoreStartupParameter::LoadDefaultGameIni() const +{ + IniFile game_ini; + game_ini.Load(m_strGameIniDefault); + if (m_strGameIniDefaultRevisionSpecific != "") + game_ini.Load(m_strGameIniDefaultRevisionSpecific, true); + return game_ini; +} + +IniFile SCoreStartupParameter::LoadLocalGameIni() const +{ + IniFile game_ini; + game_ini.Load(m_strGameIniLocal); + return game_ini; +} diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h index 986424a089..9821580c84 100644 --- a/Source/Core/Core/Src/CoreParameter.h +++ b/Source/Core/Core/Src/CoreParameter.h @@ -197,8 +197,10 @@ struct SCoreStartupParameter std::string m_strDVDRoot; std::string m_strApploader; std::string m_strUniqueID; + std::string m_strRevisionSpecificUniqueID; std::string m_strName; std::string m_strGameIniDefault; + std::string m_strGameIniDefaultRevisionSpecific; std::string m_strGameIniLocal; // Constructor just calls LoadDefaults @@ -208,6 +210,9 @@ struct SCoreStartupParameter bool AutoSetup(EBootBS2 _BootBS2); const std::string &GetUniqueID() const { return m_strUniqueID; } void CheckMemcardPath(std::string& memcardPath, std::string Region, bool isSlotA); + IniFile LoadDefaultGameIni() const; + IniFile LoadLocalGameIni() const; + IniFile LoadGameIni() const; }; #endif diff --git a/Source/Core/Core/Src/GeckoCode.h b/Source/Core/Core/Src/GeckoCode.h index 59da6fd091..4156be8cbb 100644 --- a/Source/Core/Core/Src/GeckoCode.h +++ b/Source/Core/Core/Src/GeckoCode.h @@ -65,7 +65,8 @@ namespace Gecko std::string name, creator; std::vector notes; - bool enabled; + bool enabled; + bool user_defined; bool Compare(GeckoCode compare) const; bool Exist(u32 address, u32 data); diff --git a/Source/Core/Core/Src/GeckoCodeConfig.cpp b/Source/Core/Core/Src/GeckoCodeConfig.cpp index 54a00d1a47..7657e98de9 100644 --- a/Source/Core/Core/Src/GeckoCodeConfig.cpp +++ b/Source/Core/Core/Src/GeckoCodeConfig.cpp @@ -15,70 +15,74 @@ namespace Gecko { -// TODO: Support loading codes from default game inis. -void LoadCodes(const IniFile& inifile, std::vector& gcodes) +void LoadCodes(const IniFile& globalIni, const IniFile& localIni, std::vector& gcodes) { - std::vector lines; - inifile.GetLines(GECKO_CODE_INI_SECTION, lines, false); - - GeckoCode gcode; - - std::vector::const_iterator - lines_iter = lines.begin(), - lines_end = lines.end(); - for (; lines_iter!=lines_end; ++lines_iter) + const IniFile* inis[] = {&globalIni, &localIni}; + for (size_t i = 0; i < ArraySize(inis); ++i) { - if (lines_iter->empty()) - continue; + std::vector lines; + inis[i]->GetLines(GECKO_CODE_INI_SECTION, lines, false); - std::istringstream ss(*lines_iter); + GeckoCode gcode; - switch ((*lines_iter)[0]) + for (auto lines_iter = lines.begin(); lines_iter!=lines.end(); ++lines_iter) { + if (lines_iter->empty()) + continue; - // enabled or disabled code - case '+' : - ss.seekg(1); - case '$' : - if (gcode.name.size()) - gcodes.push_back(gcode); - gcode = GeckoCode(); - gcode.enabled = (1 == ss.tellg()); // silly - ss.seekg(1, std::ios_base::cur); - // read the code name - std::getline(ss, gcode.name, '['); // stop at [ character (beginning of contributor name) - gcode.name = StripSpaces(gcode.name); - // read the code creator name - std::getline(ss, gcode.creator, ']'); - break; + std::istringstream ss(*lines_iter); - // notes - case '*': - gcode.notes.push_back(std::string(++lines_iter->begin(), lines_iter->end())); - break; + switch ((*lines_iter)[0]) + { + + // enabled or disabled code + case '+' : + ss.seekg(1); + case '$' : + if (gcode.name.size()) + gcodes.push_back(gcode); + gcode = GeckoCode(); + gcode.enabled = (1 == ss.tellg()); // silly + gcode.user_defined = i == 1; + ss.seekg(1, std::ios_base::cur); + // read the code name + std::getline(ss, gcode.name, '['); // stop at [ character (beginning of contributor name) + gcode.name = StripSpaces(gcode.name); + // read the code creator name + std::getline(ss, gcode.creator, ']'); + break; + + // notes + case '*': + gcode.notes.push_back(std::string(++lines_iter->begin(), lines_iter->end())); + break; + + // either part of the code, or an option choice + default : + { + GeckoCode::Code new_code; + // TODO: support options + new_code.original_line = *lines_iter; + ss >> std::hex >> new_code.address >> new_code.data; + gcode.codes.push_back(new_code); + } + break; + } - // either part of the code, or an option choice - default : - { - GeckoCode::Code new_code; - // TODO: support options - new_code.original_line = *lines_iter; - ss >> std::hex >> new_code.address >> new_code.data; - gcode.codes.push_back(new_code); - } - break; } + // add the last code + if (gcode.name.size()) + gcodes.push_back(gcode); } - - // add the last code - if (gcode.name.size()) - gcodes.push_back(gcode); } // used by the SaveGeckoCodes function void SaveGeckoCode(std::vector& lines, const GeckoCode& gcode) { + if (!gcode.user_defined) + return; + std::string name; if (gcode.enabled) diff --git a/Source/Core/Core/Src/GeckoCodeConfig.h b/Source/Core/Core/Src/GeckoCodeConfig.h index 1b3d5e5bf9..b4902f4574 100644 --- a/Source/Core/Core/Src/GeckoCodeConfig.h +++ b/Source/Core/Core/Src/GeckoCodeConfig.h @@ -12,7 +12,7 @@ namespace Gecko { -void LoadCodes(const IniFile& inifile, std::vector& gcodes); +void LoadCodes(const IniFile& globalIni, const IniFile& localIni, std::vector& gcodes); void SaveCodes(IniFile& inifile, const std::vector& gcodes); }; diff --git a/Source/Core/Core/Src/PatchEngine.cpp b/Source/Core/Core/Src/PatchEngine.cpp index c7d133132b..e266e0d098 100644 --- a/Source/Core/Core/Src/PatchEngine.cpp +++ b/Source/Core/Core/Src/PatchEngine.cpp @@ -28,6 +28,7 @@ #include "GeckoCode.h" #include "GeckoCodeConfig.h" #include "FileUtil.h" +#include "ConfigManager.h" using namespace Common; @@ -166,22 +167,18 @@ int GetSpeedhackCycles(const u32 addr) return iter->second; } -void LoadPatches(const char *gameID) +void LoadPatches() { - IniFile globalIni, localIni; - globalIni.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + gameID + ".ini"); - localIni.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + gameID + ".ini", true); - - IniFile merged; - merged.Load(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + gameID + ".ini"); - merged.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + gameID + ".ini", true); + IniFile merged = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni(); + IniFile globalIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadDefaultGameIni(); + IniFile localIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadLocalGameIni(); LoadPatchSection("OnFrame", onFrame, globalIni, localIni); ActionReplay::LoadCodes(globalIni, localIni, false); // lil silly std::vector gcodes; - Gecko::LoadCodes(localIni, gcodes); + Gecko::LoadCodes(globalIni, localIni, gcodes); Gecko::SetActiveCodes(gcodes); LoadSpeedhacks("Speedhacks", speedHacks, merged); diff --git a/Source/Core/Core/Src/PatchEngine.h b/Source/Core/Core/Src/PatchEngine.h index 13de073eb9..ba3d155bf4 100644 --- a/Source/Core/Core/Src/PatchEngine.h +++ b/Source/Core/Core/Src/PatchEngine.h @@ -39,7 +39,7 @@ struct Patch int GetSpeedhackCycles(const u32 addr); void LoadPatchSection(const char *section, std::vector &patches, IniFile &globalIni, IniFile &localIni); -void LoadPatches(const char *gameID); +void LoadPatches(); void ApplyFramePatches(); void ApplyARPatches(); void Shutdown(); diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h index 454319c876..a39816f8c1 100644 --- a/Source/Core/DiscIO/Src/Volume.h +++ b/Source/Core/DiscIO/Src/Volume.h @@ -25,6 +25,7 @@ public: virtual bool GetTitleID(u8*) const { return false; } virtual void GetTMD(u8*, u32 *_sz) const { *_sz=0; } virtual std::string GetUniqueID() const = 0; + virtual std::string GetRevisionSpecificUniqueID() const { return ""; } virtual std::string GetMakerID() const = 0; virtual int GetRevision() const { return 0; } // TODO: eliminate? diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp index ba858467fc..f7f2b7ea40 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.cpp +++ b/Source/Core/DiscIO/Src/VolumeGC.cpp @@ -54,6 +54,13 @@ std::string CVolumeGC::GetUniqueID() const return ID; } +std::string CVolumeGC::GetRevisionSpecificUniqueID() const +{ + char rev[16]; + sprintf(rev, "r%d", GetRevision()); + return GetUniqueID() + rev; +} + IVolume::ECountry CVolumeGC::GetCountry() const { if (!m_pReader) diff --git a/Source/Core/DiscIO/Src/VolumeGC.h b/Source/Core/DiscIO/Src/VolumeGC.h index fcc7aec611..55f84c1c0c 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.h +++ b/Source/Core/DiscIO/Src/VolumeGC.h @@ -20,6 +20,7 @@ public: bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const; bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const; std::string GetUniqueID() const; + std::string GetRevisionSpecificUniqueID() const; std::string GetMakerID() const; int GetRevision() const; std::vector GetNames() const; diff --git a/Source/Core/DolphinWX/Src/CheatsWindow.cpp b/Source/Core/DolphinWX/Src/CheatsWindow.cpp index 332e186289..413713b4ae 100644 --- a/Source/Core/DolphinWX/Src/CheatsWindow.cpp +++ b/Source/Core/DolphinWX/Src/CheatsWindow.cpp @@ -242,10 +242,9 @@ void wxCheatsWindow::OnEvent_Close(wxCloseEvent& ev) void wxCheatsWindow::UpdateGUI() { // load code - m_gameini_default_path = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + Core::g_CoreStartupParameter.GetUniqueID() + ".ini"; - m_gameini_default.Load(m_gameini_default_path); - m_gameini_local_path = File::GetUserPath(D_GAMESETTINGS_IDX) + Core::g_CoreStartupParameter.GetUniqueID() + ".ini"; - m_gameini_local.Load(m_gameini_local_path, true); + m_gameini_default = Core::g_CoreStartupParameter.LoadDefaultGameIni(); + m_gameini_local = Core::g_CoreStartupParameter.LoadLocalGameIni(); + m_gameini_local_path = Core::g_CoreStartupParameter.m_strGameIniLocal; Load_ARCodes(); Load_GeckoCodes(); @@ -286,7 +285,7 @@ void wxCheatsWindow::Load_ARCodes() void wxCheatsWindow::Load_GeckoCodes() { - m_geckocode_panel->LoadCodes(m_gameini_local, Core::g_CoreStartupParameter.GetUniqueID(), true); + m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, Core::g_CoreStartupParameter.GetUniqueID(), true); } void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (event)) diff --git a/Source/Core/DolphinWX/Src/CheatsWindow.h b/Source/Core/DolphinWX/Src/CheatsWindow.h index ee2d0e1892..c7cdb7f151 100644 --- a/Source/Core/DolphinWX/Src/CheatsWindow.h +++ b/Source/Core/DolphinWX/Src/CheatsWindow.h @@ -132,7 +132,6 @@ class wxCheatsWindow : public wxDialog Gecko::CodeConfigPanel *m_geckocode_panel; IniFile m_gameini_default; IniFile m_gameini_local; - std::string m_gameini_default_path; std::string m_gameini_local_path; void Init_ChildControls(); diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp index 39130bcf8e..514fea3463 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp @@ -81,13 +81,13 @@ void CodeConfigPanel::UpdateCodeList(bool checkRunning) UpdateInfoBox(evt); } -void CodeConfigPanel::LoadCodes(const IniFile& inifile, const std::string& gameid, bool checkRunning) +void CodeConfigPanel::LoadCodes(const IniFile& globalIni, const IniFile& localIni, const std::string& gameid, bool checkRunning) { m_gameid = gameid; m_gcodes.clear(); if (!checkRunning || Core::IsRunning()) - Gecko::LoadCodes(inifile, m_gcodes); + Gecko::LoadCodes(globalIni, localIni, m_gcodes); UpdateCodeList(checkRunning); } diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h index 0140966c5e..c961e221e3 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h @@ -20,7 +20,7 @@ public: CodeConfigPanel(wxWindow* const parent); - void LoadCodes(const IniFile& inifile, const std::string& gameid = "", bool checkRunning = false); + void LoadCodes(const IniFile& globalIni, const IniFile& localIni, const std::string& gameid = "", bool checkRunning = false); const std::vector& GetCodes() const { return m_gcodes; } protected: diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index e81b710086..6bbbfa467c 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -110,6 +110,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW // Load game ini std::string _iniFilename = OpenISO->GetUniqueID(); + std::string _iniFilenameRevisionSpecific = OpenISO->GetRevisionSpecificUniqueID(); if (!_iniFilename.length()) { @@ -123,9 +124,12 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW } GameIniFileDefault = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + _iniFilename + ".ini"; + std::string GameIniFileDefaultRevisionSpecific = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + _iniFilenameRevisionSpecific + ".ini"; GameIniFileLocal = File::GetUserPath(D_GAMESETTINGS_IDX) + _iniFilename + ".ini"; GameIniDefault.Load(GameIniFileDefault); + if (_iniFilenameRevisionSpecific != "") + GameIniDefault.Load(GameIniFileDefaultRevisionSpecific); GameIniLocal.Load(GameIniFileLocal); // Setup GUI @@ -1047,7 +1051,7 @@ void CISOProperties::LoadGameConfig() PatchList_Load(); ActionReplayList_Load(); - m_geckocode_panel->LoadCodes(GameIniLocal, OpenISO->GetUniqueID()); + m_geckocode_panel->LoadCodes(GameIniDefault, GameIniLocal, OpenISO->GetUniqueID()); } void CISOProperties::SaveGameIniValueFrom3StateCheckbox(const char* section, const char* key, wxCheckBox* checkbox) diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index e81807985a..22c75131eb 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -12,6 +12,7 @@ #include "Core.h" #include "Movie.h" #include "OnScreenDisplay.h" +#include "ConfigManager.h" VideoConfig g_Config; VideoConfig g_ActiveConfig; @@ -120,7 +121,7 @@ void VideoConfig::Load(const char *ini_file) OSD::AddMessage("Warning: Shader Debugging is enabled, performance will suffer heavily", 15000); } -void VideoConfig::GameIniLoad(const char* default_ini_file, const char* local_ini_file) +void VideoConfig::GameIniLoad() { bool gfx_override_exists = false; @@ -136,9 +137,7 @@ void VideoConfig::GameIniLoad(const char* default_ini_file, const char* local_in } \ } while (0) - IniFile iniFile; - iniFile.Load(default_ini_file); - iniFile.Load(local_ini_file, true); + IniFile iniFile = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni(); CHECK_SETTING("Video_Hardware", "VSync", bVSync); diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h index cfb4a1ccde..489b75de0d 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.h +++ b/Source/Core/VideoCommon/Src/VideoConfig.h @@ -50,10 +50,9 @@ struct VideoConfig { VideoConfig(); void Load(const char *ini_file); - void GameIniLoad(const char* default_ini, const char* game_ini); + void GameIniLoad(); void VerifyValidity(); void Save(const char *ini_file); - void GameIniSave(const char* default_ini, const char* game_ini); void UpdateProjectionHack(); bool IsVSync(); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp index 328cb5fa31..59f0899d81 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp @@ -157,7 +157,7 @@ bool VideoBackend::Initialize(void *&window_handle) const SCoreStartupParameter& core_params = SConfig::GetInstance().m_LocalCoreStartupParameter; g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_dx11.ini").c_str()); - g_Config.GameIniLoad(core_params.m_strGameIniDefault.c_str(), core_params.m_strGameIniLocal.c_str()); + g_Config.GameIniLoad(); g_Config.UpdateProjectionHack(); g_Config.VerifyValidity(); UpdateActiveConfig(); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index 08c76f4a49..eff3fd9d1c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -150,8 +150,7 @@ bool VideoBackend::Initialize(void *&window_handle) frameCount = 0; g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_dx9.ini").c_str()); - g_Config.GameIniLoad(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIniDefault.c_str(), - SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIniLocal.c_str()); + g_Config.GameIniLoad(); g_Config.UpdateProjectionHack(); g_Config.VerifyValidity(); // as only some driver/hardware configurations support dual source blending only enable it if is diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 60f2748eeb..b109fcdd8b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -172,8 +172,7 @@ bool VideoBackend::Initialize(void *&window_handle) frameCount = 0; g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini").c_str()); - g_Config.GameIniLoad(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIniDefault.c_str(), - SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIniLocal.c_str()); + g_Config.GameIniLoad(); g_Config.UpdateProjectionHack(); g_Config.VerifyValidity(); UpdateActiveConfig();