From cfabbd7f97c55a08215e8c3c8228109a37a60b41 Mon Sep 17 00:00:00 2001 From: BearOso Date: Sun, 12 May 2024 15:11:47 -0500 Subject: [PATCH] Qt: Prefer non-local config dir on Windows, and check for correct name. --- qt/src/EmuConfig.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/src/EmuConfig.cpp b/qt/src/EmuConfig.cpp index 90c420dd..7d90214e 100644 --- a/qt/src/EmuConfig.cpp +++ b/qt/src/EmuConfig.cpp @@ -144,7 +144,7 @@ std::string EmuConfig::findConfigDir() fs::path path; 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)) return app_dir_path.toStdString(); @@ -164,12 +164,12 @@ std::string EmuConfig::findConfigDir() path = "./.snes9x"; } #else - if ((dir = getenv("LOCALAPPDATA"))) + if ((dir = getenv("APPDATA"))) { path = dir; path /= "Snes9x"; } - else if ((dir = getenv("APPDATA"))) + else if ((dir = getenv("LOCALAPPDATA"))) { path = dir; path /= "Snes9x";