diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 78eb8f82a1..17049fa0e2 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -1346,9 +1346,8 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point) if (action->isEnabled()) { connect(action, &QAction::triggered, [entry]() { - SettingsWindow::openGamePropertiesDialog(entry, entry->title, - (entry->type != GameList::EntryType::ELF) ? entry->serial : std::string(), - entry->crc); + SettingsWindow::openGamePropertiesDialog(entry, + entry->title, entry->serial, entry->crc, entry->type == GameList::EntryType::ELF); }); } @@ -1564,7 +1563,7 @@ void MainWindow::onViewGamePropertiesActionTriggered() if (entry) { SettingsWindow::openGamePropertiesDialog( - entry, entry->title, s_current_elf_override.isEmpty() ? entry->serial : std::string(), entry->crc); + entry, entry->title, entry->serial, entry->crc, !s_current_elf_override.isEmpty()); return; } } @@ -1580,12 +1579,12 @@ void MainWindow::onViewGamePropertiesActionTriggered() if (s_current_elf_override.isEmpty()) { SettingsWindow::openGamePropertiesDialog( - nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc); + nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc, false); } else { SettingsWindow::openGamePropertiesDialog( - nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc); + nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc, true); } } diff --git a/pcsx2-qt/Settings/SettingsWindow.cpp b/pcsx2-qt/Settings/SettingsWindow.cpp index ddbea6ed27..9db57ebec2 100644 --- a/pcsx2-qt/Settings/SettingsWindow.cpp +++ b/pcsx2-qt/Settings/SettingsWindow.cpp @@ -649,9 +649,9 @@ void SettingsWindow::saveAndReloadGameSettings() g_emu_thread->reloadGameSettings(); } -void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc) +void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf) { - std::string filename = VMManager::GetGameSettingsPath(serial, disc_crc); + std::string filename = VMManager::GetGameSettingsPath(!is_elf ? serial : std::string_view(), disc_crc); // check for an existing dialog with this filename for (SettingsWindow* dialog : s_open_game_properties_dialogs) diff --git a/pcsx2-qt/Settings/SettingsWindow.h b/pcsx2-qt/Settings/SettingsWindow.h index 7425f3bfb5..33031bcfcd 100644 --- a/pcsx2-qt/Settings/SettingsWindow.h +++ b/pcsx2-qt/Settings/SettingsWindow.h @@ -45,7 +45,7 @@ public: u32 disc_crc, QString filename = QString()); ~SettingsWindow(); - static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc); + static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf); static void closeGamePropertiesDialogs(); SettingsInterface* getSettingsInterface() const;