mirror of https://github.com/PCSX2/pcsx2.git
gs: ensure the config file is set correctly
This commit is contained in:
parent
edaa8f7817
commit
31c70a7c38
|
@ -75,11 +75,6 @@ void GSsetBaseMem(uint8* mem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSsetSettingsDir(const char* dir)
|
|
||||||
{
|
|
||||||
theApp.SetConfigDir(dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
int GSinit()
|
int GSinit()
|
||||||
{
|
{
|
||||||
if (!GSUtil::CheckSSE())
|
if (!GSUtil::CheckSSE())
|
||||||
|
@ -91,8 +86,10 @@ int GSinit()
|
||||||
// can crash if the CPU does not support the instruction set.
|
// can crash if the CPU does not support the instruction set.
|
||||||
// Initialise it here instead - it's not ideal since we have to strip the
|
// Initialise it here instead - it's not ideal since we have to strip the
|
||||||
// const type qualifier from all the affected variables.
|
// const type qualifier from all the affected variables.
|
||||||
|
theApp.SetConfigDir();
|
||||||
theApp.Init();
|
theApp.Init();
|
||||||
|
|
||||||
|
|
||||||
GSUtil::Init();
|
GSUtil::Init();
|
||||||
|
|
||||||
if (g_const == nullptr)
|
if (g_const == nullptr)
|
||||||
|
@ -710,6 +707,7 @@ void GSconfigure()
|
||||||
if (!GSUtil::CheckSSE())
|
if (!GSUtil::CheckSSE())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
theApp.SetConfigDir();
|
||||||
theApp.Init();
|
theApp.Init();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1492,8 +1490,6 @@ void GSApp::Init()
|
||||||
|
|
||||||
m_current_renderer_type = GSRendererType::Undefined;
|
m_current_renderer_type = GSRendererType::Undefined;
|
||||||
|
|
||||||
if (m_ini.empty())
|
|
||||||
m_ini = "inis/GS.ini";
|
|
||||||
m_section = "Settings";
|
m_section = "Settings";
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1781,23 +1777,13 @@ void* GSApp::GetModuleHandlePtr()
|
||||||
return s_hModule;
|
return s_hModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSApp::SetConfigDir(const char* dir)
|
void GSApp::SetConfigDir()
|
||||||
{
|
{
|
||||||
if (dir == NULL)
|
// we need to initialize the ini folder later at runtime than at theApp init, as
|
||||||
{
|
// core settings aren't populated yet, thus we do populate it if needed either when
|
||||||
m_ini = "inis/GS.ini";
|
// opening GS settings or init -- govanify
|
||||||
}
|
wxString iniName(L"GS.ini");
|
||||||
else
|
m_ini = GetSettingsFolder().Combine(iniName).GetFullPath();
|
||||||
{
|
|
||||||
m_ini = dir;
|
|
||||||
|
|
||||||
if (m_ini[m_ini.length() - 1] != DIRECTORY_SEPARATOR)
|
|
||||||
{
|
|
||||||
m_ini += DIRECTORY_SEPARATOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_ini += "GS.ini";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GSApp::GetConfigS(const char* entry)
|
std::string GSApp::GetConfigS(const char* entry)
|
||||||
|
|
|
@ -1844,7 +1844,6 @@ const GSVector2i default_rt_size(1280, 1024);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GSsetBaseMem(uint8* mem);
|
void GSsetBaseMem(uint8* mem);
|
||||||
void GSsetSettingsDir(const char* dir);
|
|
||||||
int GSinit();
|
int GSinit();
|
||||||
void GSshutdown();
|
void GSshutdown();
|
||||||
void GSclose();
|
void GSclose();
|
||||||
|
@ -1882,13 +1881,13 @@ void GSsetExclusive(int enabled);
|
||||||
|
|
||||||
class GSApp
|
class GSApp
|
||||||
{
|
{
|
||||||
std::string m_ini;
|
|
||||||
std::string m_section;
|
std::string m_section;
|
||||||
std::map<std::string, std::string> m_default_configuration;
|
std::map<std::string, std::string> m_default_configuration;
|
||||||
std::map<std::string, std::string> m_configuration_map;
|
std::map<std::string, std::string> m_configuration_map;
|
||||||
GSRendererType m_current_renderer_type;
|
GSRendererType m_current_renderer_type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
std::string m_ini;
|
||||||
GSApp();
|
GSApp();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
@ -1929,7 +1928,7 @@ public:
|
||||||
void SetCurrentRendererType(GSRendererType type);
|
void SetCurrentRendererType(GSRendererType type);
|
||||||
GSRendererType GetCurrentRendererType() const;
|
GSRendererType GetCurrentRendererType() const;
|
||||||
|
|
||||||
void SetConfigDir(const char* dir);
|
void SetConfigDir();
|
||||||
|
|
||||||
std::vector<GSSetting> m_gs_renderers;
|
std::vector<GSSetting> m_gs_renderers;
|
||||||
std::vector<GSSetting> m_gs_interlace;
|
std::vector<GSSetting> m_gs_interlace;
|
||||||
|
|
Loading…
Reference in New Issue