summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
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;