Qt: stop batch compilation immediately on cancel

This commit is contained in:
Megamouse 2025-01-04 02:11:19 +01:00
parent 2614450e4b
commit 51417cc8c3

View File

@ -2414,6 +2414,14 @@ void game_list_frame::BatchCreateCPUCaches(const std::vector<game_info>& game_da
pdlg->setAutoReset(false);
pdlg->open();
connect(pdlg, &progress_dialog::canceled, this, []()
{
if (!Emu.IsStopped())
{
Emu.GracefulShutdown(false, true);
}
});
BatchActionBySerials(pdlg, serials, tr("%0\nProgress: %1/%2 caches compiled").arg(main_label),
[&, game_data](const std::string& serial)
{