From d7c90050af609954ae87c297abce5d32b6e717f1 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Fri, 7 Jan 2022 13:21:55 +0100 Subject: [PATCH] fix the issues Nadia pointed out --- src/frontend/qt_sdl/FirmwareSettingsDialog.h | 2 +- src/frontend/qt_sdl/PathSettingsDialog.h | 2 +- src/frontend/qt_sdl/ROMManager.cpp | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/frontend/qt_sdl/FirmwareSettingsDialog.h b/src/frontend/qt_sdl/FirmwareSettingsDialog.h index 1ae409f6..7ed8b0bd 100644 --- a/src/frontend/qt_sdl/FirmwareSettingsDialog.h +++ b/src/frontend/qt_sdl/FirmwareSettingsDialog.h @@ -109,7 +109,7 @@ public: } currentDlg = new FirmwareSettingsDialog(parent); - currentDlg->show(); + currentDlg->open(); return currentDlg; } static void closeDlg() diff --git a/src/frontend/qt_sdl/PathSettingsDialog.h b/src/frontend/qt_sdl/PathSettingsDialog.h index ff9dfcbf..6a0fea2d 100644 --- a/src/frontend/qt_sdl/PathSettingsDialog.h +++ b/src/frontend/qt_sdl/PathSettingsDialog.h @@ -43,7 +43,7 @@ public: } currentDlg = new PathSettingsDialog(parent); - currentDlg->show(); + currentDlg->open(); return currentDlg; } static void closeDlg() diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp index 2fa811ed..2b9bbd33 100644 --- a/src/frontend/qt_sdl/ROMManager.cpp +++ b/src/frontend/qt_sdl/ROMManager.cpp @@ -411,6 +411,22 @@ void Reset() if (Config::ConsoleType == 1) EjectGBACart(); NDS::Reset(); + if ((CartType != -1) && NDSSave) + { + std::string oldsave = NDSSave->GetPath(); + std::string newsave = GetAssetPath(false, Config::SaveFilePath, ".sav"); + if (oldsave != newsave) + NDSSave->SetPath(newsave, false); + } + + if ((GBACartType != -1) && GBASave) + { + std::string oldsave = GBASave->GetPath(); + std::string newsave = GetAssetPath(true, Config::SaveFilePath, ".sav"); + if (oldsave != newsave) + GBASave->SetPath(newsave, false); + } + if (!BaseROMName.empty()) { if (Config::DirectBoot || NDS::NeedsDirectBoot())