call SDL_Quit() on exit to prevent a crash on wayland

This commit is contained in:
Jonne Kokkonen 2024-06-02 20:57:46 +03:00
parent b1fec62564
commit ee3878e43a
1 changed files with 2 additions and 0 deletions

View File

@ -1052,6 +1052,8 @@ int main(int argc, char **argv)
#endif
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
atexit(SDL_Quit);
if ((console_supported = CON_start(completer))) {
CON_set_repeat_empty(true);
CON_printf("SameBoy v" GB_VERSION "\n");