mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix game properties dialog not activating
This commit is contained in:
parent
6c15359137
commit
367f839934
|
@ -610,18 +610,21 @@ void SettingsWindow::removeSettingValue(const char* section, const char* key)
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
// check for an existing dialog with this crc
|
std::string filename = VMManager::GetGameSettingsPath(serial, disc_crc);
|
||||||
|
|
||||||
|
// check for an existing dialog with this filename
|
||||||
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
||||||
{
|
{
|
||||||
if (dialog->m_disc_crc == disc_crc)
|
if (dialog->isPerGameSettings() && static_cast<INISettingsInterface*>(dialog->m_sif.get())->GetFileName() == filename)
|
||||||
{
|
{
|
||||||
dialog->show();
|
dialog->show();
|
||||||
|
dialog->raise();
|
||||||
|
dialog->activateWindow();
|
||||||
dialog->setFocus();
|
dialog->setFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string filename(VMManager::GetGameSettingsPath(serial, disc_crc));
|
|
||||||
std::unique_ptr<INISettingsInterface> sif = std::make_unique<INISettingsInterface>(filename);
|
std::unique_ptr<INISettingsInterface> sif = std::make_unique<INISettingsInterface>(filename);
|
||||||
if (FileSystem::FileExists(sif->GetFileName().c_str()))
|
if (FileSystem::FileExists(sif->GetFileName().c_str()))
|
||||||
sif->Load();
|
sif->Load();
|
||||||
|
|
Loading…
Reference in New Issue