mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 14:29:14 +08:00
We can wait up to 500ms in onNativeSurfaceDestroyed(), so wait at least that long in onDestroy()
This commit is contained in:
@@ -683,11 +683,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
|
|
||||||
// Wait for "SDLThread" thread to end
|
// Wait for "SDLThread" thread to end
|
||||||
try {
|
try {
|
||||||
// 500ms timeout, because:
|
// Use a timeout because:
|
||||||
// C SDLmain() thread might have started (mSDLThread.start() called)
|
// C SDLmain() thread might have started (mSDLThread.start() called)
|
||||||
// while the SDL_Init() might not have been called yet,
|
// while the SDL_Init() might not have been called yet,
|
||||||
// and so the previous QUIT event will be discarded by SDL_Init() and app is running, not exiting.
|
// and so the previous QUIT event will be discarded by SDL_Init() and app is running, not exiting.
|
||||||
SDLActivity.mSDLThread.join(500);
|
SDLActivity.mSDLThread.join(1000);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
Log.v(TAG, "Problem stopping SDLThread: " + e);
|
Log.v(TAG, "Problem stopping SDLThread: " + e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user