mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 03:06:29 +00:00
Fix system-dependent crash on exiting
This was SVN commit r8013.
This commit is contained in:
+8
-2
@@ -200,6 +200,8 @@ static int ProgressiveLoad()
|
||||
}
|
||||
|
||||
|
||||
static bool quit = false; // break out of main loop
|
||||
|
||||
static void Frame()
|
||||
{
|
||||
MICROLOG(L"Frame");
|
||||
@@ -269,6 +271,12 @@ static void Frame()
|
||||
PumpEvents();
|
||||
PROFILE_END("input");
|
||||
|
||||
// if the user quit by closing the window, the GL context will be broken and
|
||||
// may crash when we call Render() on some drivers, so leave this loop
|
||||
// before rendering
|
||||
if (quit)
|
||||
return;
|
||||
|
||||
// respond to pumped resize events
|
||||
if (g_ResizedW || g_ResizedH)
|
||||
{
|
||||
@@ -372,8 +380,6 @@ static void MainControllerShutdown()
|
||||
}
|
||||
|
||||
|
||||
static bool quit = false; // break out of main loop
|
||||
|
||||
// stop the main loop and trigger orderly shutdown. called from several
|
||||
// places: the event handler (SDL_QUIT and hotkey) and JS exitProgram.
|
||||
void kill_mainloop()
|
||||
|
||||
Reference in New Issue
Block a user