summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/gc_adapter.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-01-28 03:28:03 +0100
committerGitHub <noreply@github.com>2023-01-28 03:28:03 +0100
commit2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e (patch)
treecdd5d8f93e9f79f5e8e38515f178520c07a27f3b /src/input_common/drivers/gc_adapter.cpp
parentMerge pull request #9539 from Wollnashorn/opengl-fsr (diff)
parentinput_common: Make use of StoppableTimedWait (diff)
downloadyuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.gz
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.bz2
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.lz
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.xz
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.zst
yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.zip
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
-rw-r--r--src/input_common/drivers/gc_adapter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp
index ecb3e9dc2..d09ff178b 100644
--- a/src/input_common/drivers/gc_adapter.cpp
+++ b/src/input_common/drivers/gc_adapter.cpp
@@ -6,6 +6,7 @@
#include "common/logging/log.h"
#include "common/param_package.h"
+#include "common/polyfill_thread.h"
#include "common/settings_input.h"
#include "common/thread.h"
#include "input_common/drivers/gc_adapter.h"
@@ -217,8 +218,7 @@ void GCAdapter::AdapterScanThread(std::stop_token stop_token) {
Common::SetCurrentThreadName("ScanGCAdapter");
usb_adapter_handle = nullptr;
pads = {};
- while (!stop_token.stop_requested() && !Setup()) {
- std::this_thread::sleep_for(std::chrono::seconds(2));
+ while (!Setup() && Common::StoppableTimedWait(stop_token, std::chrono::seconds{2})) {
}
}