diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 03502a5a14..f475c6cc04 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -552,6 +552,8 @@ void MainWindow::destroySubWindows() m_settings_window->deleteLater(); m_settings_window = nullptr; } + + SettingsWindow::closeGamePropertiesDialogs(); } void MainWindow::onScreenshotActionTriggered() diff --git a/pcsx2-qt/Settings/SettingsWindow.cpp b/pcsx2-qt/Settings/SettingsWindow.cpp index c00c44e623..25bc3053b9 100644 --- a/pcsx2-qt/Settings/SettingsWindow.cpp +++ b/pcsx2-qt/Settings/SettingsWindow.cpp @@ -645,3 +645,11 @@ void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const dialog->show(); } +void SettingsWindow::closeGamePropertiesDialogs() +{ + for (SettingsWindow* dialog : s_open_game_properties_dialogs) + { + dialog->close(); + dialog->deleteLater(); + } +} diff --git a/pcsx2-qt/Settings/SettingsWindow.h b/pcsx2-qt/Settings/SettingsWindow.h index 1a95d4c3fc..3038f5f2fe 100644 --- a/pcsx2-qt/Settings/SettingsWindow.h +++ b/pcsx2-qt/Settings/SettingsWindow.h @@ -56,6 +56,7 @@ public: ~SettingsWindow(); static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc); + static void closeGamePropertiesDialogs(); SettingsInterface* getSettingsInterface() const; __fi bool isPerGameSettings() const { return static_cast(m_sif); }