1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Qt: only do a hard refresh when new games may have been added

This commit is contained in:
Megamouse 2023-04-26 22:59:14 +02:00
parent 96165cd21d
commit 711afeb688
2 changed files with 10 additions and 7 deletions

View File

@ -455,7 +455,7 @@ void main_window::show_boot_error(game_boot_result status)
msg.exec();
}
void main_window::Boot(const std::string& path, const std::string& title_id, bool direct, cfg_mode config_mode, const std::string& config_path)
void main_window::Boot(const std::string& path, const std::string& title_id, bool direct, bool refresh_list, cfg_mode config_mode, const std::string& config_path)
{
if (!m_gui_settings->GetBootConfirmation(this, gui::ib_confirm_boot))
{
@ -476,9 +476,12 @@ void main_window::Boot(const std::string& path, const std::string& title_id, boo
gui_log.success("Boot successful.");
AddRecentAction(gui::Recent_Game(qstr(Emu.GetBoot()), qstr(Emu.GetTitleAndTitleID())));
}
m_game_list_frame->Refresh(true);
if (refresh_list)
{
m_game_list_frame->Refresh(true);
}
}
}
void main_window::BootElf()
@ -517,7 +520,7 @@ void main_window::BootElf()
const std::string path = sstr(QFileInfo(file_path).absoluteFilePath());
gui_log.notice("Booting from BootElf...");
Boot(path, "", true);
Boot(path, "", true, true);
}
void main_window::BootTest()
@ -615,7 +618,7 @@ void main_window::BootGame()
m_gui_settings->SetValue(gui::fd_boot_game, QFileInfo(dir_path).path());
gui_log.notice("Booting from BootGame...");
Boot(sstr(dir_path));
Boot(sstr(dir_path), "", false, true);
}
void main_window::BootVSH()
@ -2886,7 +2889,7 @@ void main_window::CreateDockWindows()
connect(m_game_list_frame, &game_list_frame::RequestBoot, this, [this](const game_info& game, cfg_mode config_mode, const std::string& config_path, const std::string& savestate)
{
Boot(savestate.empty() ? game->info.path : savestate, game->info.serial, false, config_mode, config_path);
Boot(savestate.empty() ? game->info.path : savestate, game->info.serial, false, false, config_mode, config_path);
});
connect(m_game_list_frame, &game_list_frame::NotifyEmuSettingsChange, this, &main_window::NotifyEmuSettingsChange);

View File

@ -109,7 +109,7 @@ public Q_SLOTS:
private Q_SLOTS:
void OnPlayOrPause();
void Boot(const std::string& path, const std::string& title_id = "", bool direct = false, cfg_mode config_mode = cfg_mode::custom, const std::string& config_path = "");
void Boot(const std::string& path, const std::string& title_id = "", bool direct = false, bool refresh_list = false, cfg_mode config_mode = cfg_mode::custom, const std::string& config_path = "");
void BootElf();
void BootTest();
void BootGame();