From 9187200de3b69fb74b20d93693a84ee2f446b0a8 Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 5 Sep 2015 11:36:16 +0200 Subject: [PATCH] Android: Abort the screenshot after 2 seconds If the emulation is crashed, this blocks forever. So there is no way to exit the emulation within a finite time. --- Source/Core/DolphinWX/MainAndroid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index 1d48f5c103..1f6edfe6b3 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -397,7 +397,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulati JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj) { Core::SaveScreenShot("thumb"); - Renderer::s_screenshotCompleted.Wait(); + Renderer::s_screenshotCompleted.WaitFor(std::chrono::seconds(2)); Core::Stop(); updateMainFrameEvent.Set(); // Kick the waiting event }