diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/android/app/src/main/jni/native.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 119c7cd01..e1b771468 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -126,6 +126,7 @@ public: } void HaltEmulation() { + std::scoped_lock lock(mutex); is_running = false; cv.notify_one(); } @@ -145,7 +146,8 @@ public: while (true) { { std::unique_lock lock(mutex); - if (cv.wait_for(lock, std::chrono::seconds(1), [&]() { return !is_running; })) { + if (cv.wait_for(lock, std::chrono::milliseconds(100), + [&]() { return !is_running; })) { // Emulation halted. break; } |