summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2020-09-20 19:06:10 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2020-09-20 19:06:10 -0500
commitdbe27903f406d269e94631d142d5f1b636289e79 (patch)
treea39ddaed682be62999ceff909d5d1380c221e9b2 /src/mainwindow.cpp
parent4d6f43926b5e37ed97d2c4066c21e609f5ceb537 (diff)
parent35500736ab60ed1b30d5592e6edb5d38b57c66a0 (diff)
Merge remote-tracking branch 'origin/master' into master
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b3682297..b597af37 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1893,12 +1893,16 @@ QDir MainWindow::currentSavesDir() const
iniPath += "/" + iniFiles[0];
wchar_t path[MAX_PATH];
- ::GetPrivateProfileStringW(
- L"General", L"SLocalSavePath", L"Saves",
- path, MAX_PATH,
- iniPath.toStdWString().c_str()
- );
- savesDir.setPath(m_OrganizerCore.managedGame()->documentsDirectory().absoluteFilePath(QString::fromWCharArray(path)));
+ if (::GetPrivateProfileStringW(
+ L"General", L"SLocalSavePath", L"",
+ path, MAX_PATH,
+ iniPath.toStdWString().c_str()
+ )) {
+ savesDir.setPath(m_OrganizerCore.managedGame()->documentsDirectory().absoluteFilePath(QString::fromWCharArray(path)));
+ }
+ else {
+ savesDir = m_OrganizerCore.managedGame()->savesDirectory();
+ }
}
return savesDir;