use SDL_Quit() instead of _Exit(0)

This commit is contained in:
briaguya 2022-05-23 15:57:50 -04:00
commit 60642c8591
2 changed files with 3 additions and 10 deletions

View file

@ -11,6 +11,7 @@
#include <X11/extensions/Xrandr.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <SDL2/SDL.h>
#include "gfx_window_manager_api.h"
#include "gfx_screen_config.h"
@ -440,12 +441,8 @@ static void gfx_glx_handle_events(void) {
}
}
if (xev.type == ClientMessage && (Atom)xev.xclient.data.l[0] == glx.atom_wm_delete_window) {
#ifndef __linux__
SDL_Quit();
exit(0);
#endif
#ifdef __linux__
_Exit(0);
#endif
}
}
}

View file

@ -250,12 +250,8 @@ static void gfx_sdl_handle_events(void) {
}
break;
case SDL_QUIT:
#ifndef __linux__
SDL_Quit();
exit(0);
#endif
#ifdef __linux__
_Exit(0);
#endif
}
}
}