mirror of https://github.com/PCSX2/pcsx2.git
Qt/Patches: Use the game list serial when populating patches for the ELF
This makes the Game Properties window match the behaviour of the VM when booting into a game. Fixes #11533
This commit is contained in:
parent
534ddd80ae
commit
d8e310e7bf
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue