mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-01 07:30:45 +00:00
Revert "Avoid segfault in render thread on mobile shutdown codepath"
This reverts commit ddefceaf08
.
- need an additional boolean instead
This commit is contained in:
parent
4305909d67
commit
38813bb2a1
@ -628,8 +628,14 @@ static void _gldriver_shutdown(void) {
|
|||||||
static void gldriver_shutdown(void) {
|
static void gldriver_shutdown(void) {
|
||||||
#if USE_GLUT
|
#if USE_GLUT
|
||||||
glutLeaveMainLoop();
|
glutLeaveMainLoop();
|
||||||
#endif
|
#else
|
||||||
|
# if MOBILE_DEVICE
|
||||||
|
// it could be a temporary backgrounding do nothing here ...
|
||||||
|
_gldriver_shutdown();
|
||||||
|
# else
|
||||||
emulator_shutting_down = true;
|
emulator_shutting_down = true;
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -667,13 +673,6 @@ static void gldriver_render(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MOBILE_DEVICE
|
|
||||||
if (UNLIKELY(emulator_shutting_down)) {
|
|
||||||
_gldriver_shutdown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
#if MOBILE_DEVICE
|
#if MOBILE_DEVICE
|
||||||
glViewport(viewportX, adjustedHeight, viewportWidth, viewportHeight);
|
glViewport(viewportX, adjustedHeight, viewportWidth, viewportHeight);
|
||||||
@ -884,6 +883,7 @@ static void gldriver_main_loop(void) {
|
|||||||
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
LOG("GLUT main loop finished...");
|
LOG("GLUT main loop finished...");
|
||||||
|
emulator_shutting_down = true;
|
||||||
_gldriver_shutdown();
|
_gldriver_shutdown();
|
||||||
#endif
|
#endif
|
||||||
// fall through if not GLUT
|
// fall through if not GLUT
|
||||||
|
Loading…
Reference in New Issue
Block a user