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.
This commit is contained in:
parent
24fec3ebca
commit
9187200de3
|
@ -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)
|
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj)
|
||||||
{
|
{
|
||||||
Core::SaveScreenShot("thumb");
|
Core::SaveScreenShot("thumb");
|
||||||
Renderer::s_screenshotCompleted.Wait();
|
Renderer::s_screenshotCompleted.WaitFor(std::chrono::seconds(2));
|
||||||
Core::Stop();
|
Core::Stop();
|
||||||
updateMainFrameEvent.Set(); // Kick the waiting event
|
updateMainFrameEvent.Set(); // Kick the waiting event
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue