gsdx option: add multiple GetConfig to avoid overload issue

This commit is contained in:
Gregory Hainaut 2016-05-24 21:24:03 +02:00
parent 05818d70f4
commit 03a6f2093e
2 changed files with 20 additions and 0 deletions

View File

@ -401,6 +401,11 @@ void GSdxApp::SetConfigDir(const char* dir)
}
string GSdxApp::GetConfig(const char* entry, const char* value)
{
return GetConfigS(entry);
}
string GSdxApp::GetConfigS(const char* entry)
{
char buff[4096] = {0};
auto def = m_default_configuration.find(entry);
@ -421,6 +426,11 @@ void GSdxApp::SetConfig(const char* entry, const char* value)
}
int GSdxApp::GetConfig(const char* entry, int value)
{
return GetConfigI(entry);
}
int GSdxApp::GetConfigI(const char* entry)
{
auto def = m_default_configuration.find(entry);
@ -432,6 +442,11 @@ int GSdxApp::GetConfig(const char* entry, int value)
}
}
bool GSdxApp::GetConfigB(const char* entry)
{
return !!GetConfigI(entry);
}
void GSdxApp::SetConfig(const char* entry, int value)
{
char buff[32] = {0};

View File

@ -56,6 +56,11 @@ public:
void SetConfig(const char* entry, const char* value);
int GetConfig(const char* entry, int value);
void SetConfig(const char* entry, int value);
// Avoid issue with overloading
int GetConfigI(const char* entry);
bool GetConfigB(const char* entry);
string GetConfigS(const char* entry);
void SetConfigDir(const char* dir);