diff options
| author | 2023-01-27 18:28:03 -0800 | |
|---|---|---|
| committer | 2023-01-27 18:28:03 -0800 | |
| commit | 2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e (patch) | |
| tree | cdd5d8f93e9f79f5e8e38515f178520c07a27f3b /src/input_common/drivers/gc_adapter.cpp | |
| parent | Merge pull request #9539 from Wollnashorn/opengl-fsr (diff) | |
| parent | input_common: Make use of StoppableTimedWait (diff) | |
| download | yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.gz yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.tar.xz yuzu-2efe42fc9367588d5ffa1e5e2f25d77bd8ddc49e.zip | |
Merge pull request #9677 from Morph1984/sleep-one
polyfill_thread: Implement StoppableTimedWait
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
| -rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 4 |
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 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/param_package.h" | 8 | #include "common/param_package.h" |
| 9 | #include "common/polyfill_thread.h" | ||
| 9 | #include "common/settings_input.h" | 10 | #include "common/settings_input.h" |
| 10 | #include "common/thread.h" | 11 | #include "common/thread.h" |
| 11 | #include "input_common/drivers/gc_adapter.h" | 12 | #include "input_common/drivers/gc_adapter.h" |
| @@ -217,8 +218,7 @@ void GCAdapter::AdapterScanThread(std::stop_token stop_token) { | |||
| 217 | Common::SetCurrentThreadName("ScanGCAdapter"); | 218 | Common::SetCurrentThreadName("ScanGCAdapter"); |
| 218 | usb_adapter_handle = nullptr; | 219 | usb_adapter_handle = nullptr; |
| 219 | pads = {}; | 220 | pads = {}; |
| 220 | while (!stop_token.stop_requested() && !Setup()) { | 221 | while (!Setup() && Common::StoppableTimedWait(stop_token, std::chrono::seconds{2})) { |
| 221 | std::this_thread::sleep_for(std::chrono::seconds(2)); | ||
| 222 | } | 222 | } |
| 223 | } | 223 | } |
| 224 | 224 | ||