From 1a07f40c4b693f3e4260bbacf547ee2d4cbe97e0 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 27 Apr 2023 00:51:21 +0200 Subject: [PATCH] Qt: fix futurewatcher cancel --- rpcs3/rpcs3qt/qt_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/qt_utils.h b/rpcs3/rpcs3qt/qt_utils.h index c6487a4847..9a15f68ddd 100644 --- a/rpcs3/rpcs3qt/qt_utils.h +++ b/rpcs3/rpcs3qt/qt_utils.h @@ -133,8 +133,10 @@ namespace gui template void stop_future_watcher(QFutureWatcher& watcher, bool cancel, std::shared_ptr> cancel_flag = nullptr) { - if (watcher.isStarted() || watcher.isRunning()) + if (watcher.isPaused() || watcher.isRunning()) { + watcher.resume(); + if (cancel) { watcher.cancel();