mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 21:07:58 -05:00
input_common: Make use of StoppableTimedWait
This commit is contained in:
@ -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})) {
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user