mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Qt: fix futurewatcher cancel
This commit is contained in:
parent
eb5ea82bb1
commit
1a07f40c4b
1 changed files with 3 additions and 1 deletions
|
@ -133,8 +133,10 @@ namespace gui
|
|||
template <typename T>
|
||||
void stop_future_watcher(QFutureWatcher<T>& watcher, bool cancel, std::shared_ptr<atomic_t<bool>> cancel_flag = nullptr)
|
||||
{
|
||||
if (watcher.isStarted() || watcher.isRunning())
|
||||
if (watcher.isPaused() || watcher.isRunning())
|
||||
{
|
||||
watcher.resume();
|
||||
|
||||
if (cancel)
|
||||
{
|
||||
watcher.cancel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue