Closedown of SDL2 incomplete (leads to crash on Quit for AmigaOS 4) · Issue #744 · Wargus/stratagus · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just calling SDL_Quit() is not enough for AmigaOS 4, as the OpenGL implementation of AmigaOS will do a recoverable alert due to "not all resourced freed again" in this case (hanging the stratagus app and the shell or Workbench task from which it was started also).
Here is a complete implementation of the shutdown (hopefully works also for other platforms - if it does, just replace atexit(SDL_Quit) with atexit(CleanUpVideoSdl).
void CleanUpVideoSdl()
{
if (TheRenderer) {
SDL_DestroyRenderer(TheRenderer);
TheRenderer = nullptr;
}
if (TheWindow) {
SDL_DestroyWindow(TheWindow);
TheWindow = nullptr;
}
if (Video.blankCursor) {
SDL_FreeCursor(Video.blankCursor);
Video.blankCursor = nullptr;
}
SDL_StopTextInput();
SDL_Quit();
}
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Just calling
SDL_Quit()
is not enough for AmigaOS 4, as the OpenGL implementation of AmigaOS will do a recoverable alert due to "not all resourced freed again" in this case (hanging the stratagus app and the shell or Workbench task from which it was started also).Here is a complete implementation of the shutdown (hopefully works also for other platforms - if it does, just replace
atexit(SDL_Quit)
withatexit(CleanUpVideoSdl)
.The text was updated successfully, but these errors were encountered: