mirror of https://github.com/snes9xgit/snes9x.git
Qt: Prefer non-local config dir on Windows, and check for correct name.
This commit is contained in:
parent
911b416d28
commit
cfabbd7f97
|
@ -144,7 +144,7 @@ std::string EmuConfig::findConfigDir()
|
||||||
fs::path path;
|
fs::path path;
|
||||||
|
|
||||||
auto app_dir_path = QGuiApplication::applicationDirPath();
|
auto app_dir_path = QGuiApplication::applicationDirPath();
|
||||||
auto config_file = QDir(app_dir_path).absoluteFilePath("snes9x.conf");
|
auto config_file = QDir(app_dir_path).absoluteFilePath("snes9x-qt.conf");
|
||||||
if (QFile::exists(config_file))
|
if (QFile::exists(config_file))
|
||||||
return app_dir_path.toStdString();
|
return app_dir_path.toStdString();
|
||||||
|
|
||||||
|
@ -164,12 +164,12 @@ std::string EmuConfig::findConfigDir()
|
||||||
path = "./.snes9x";
|
path = "./.snes9x";
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if ((dir = getenv("LOCALAPPDATA")))
|
if ((dir = getenv("APPDATA")))
|
||||||
{
|
{
|
||||||
path = dir;
|
path = dir;
|
||||||
path /= "Snes9x";
|
path /= "Snes9x";
|
||||||
}
|
}
|
||||||
else if ((dir = getenv("APPDATA")))
|
else if ((dir = getenv("LOCALAPPDATA")))
|
||||||
{
|
{
|
||||||
path = dir;
|
path = dir;
|
||||||
path /= "Snes9x";
|
path /= "Snes9x";
|
||||||
|
|
Loading…
Reference in New Issue