Merge pull request #3359 from degasus/ini

VideoConfig: Use "GFX.ini" for both D3D and OGL.
This commit is contained in:
Ryan Houdek
2016-01-06 16:02:23 -05:00
5 changed files with 70 additions and 62 deletions

View File

@ -83,7 +83,7 @@ void VideoConfigDiag::Event_ClickClose(wxCommandEvent&)
void VideoConfigDiag::Event_Close(wxCloseEvent& ev)
{
g_Config.Save(File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini");
g_Config.Save(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
EndModal(wxID_OK);
}
@ -205,13 +205,15 @@ static wxArrayString GetListOfResolutions()
}
#endif
VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, const std::string& _ininame)
VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, const std::string& ininame)
: wxDialog(parent, wxID_ANY,
wxString::Format(_("Dolphin %s Graphics Configuration"), wxGetTranslation(StrToWxStr(title))))
, vconfig(g_Config)
, ininame(_ininame)
{
vconfig.Load(File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini");
if (File::Exists(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini"))
vconfig.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
else
vconfig.Load(File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini");
Bind(wxEVT_UPDATE_UI, &VideoConfigDiag::OnUpdateUI, this);

View File

@ -283,7 +283,6 @@ protected:
std::map<wxWindow*, wxStaticText*> desc_texts; // maps dialog tabs (which are the parents of the setting controls) to their description text objects
VideoConfig &vconfig;
std::string ininame;
size_t m_msaa_modes;
};

View File

@ -153,7 +153,11 @@ bool VideoBackend::Initialize(void *window_handle)
frameCount = 0;
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "gfx_dx11.ini");
if (File::Exists(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini"))
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
else
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "gfx_dx11.ini");
g_Config.GameIniLoad();
g_Config.UpdateProjectionHack();
g_Config.VerifyValidity();

View File

@ -145,7 +145,10 @@ bool VideoBackend::Initialize(void* window_handle)
frameCount = 0;
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini");
if (File::Exists(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini"))
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
else
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini");
g_Config.GameIniLoad();
g_Config.UpdateProjectionHack();
g_Config.VerifyValidity();