From bba9888224b8b1a242c9a4ea9b535d740df34209 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 4 Jan 2025 02:11:19 +0100 Subject: [PATCH] Qt: stop batch compilation immediately on cancel --- rpcs3/rpcs3qt/game_list_frame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 12886b8664..aa004211b9 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -2414,6 +2414,14 @@ void game_list_frame::BatchCreateCPUCaches(const std::vector& 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) {