mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
use SDL_Quit() instead of _Exit(0)
This commit is contained in:
parent
1b3907f232
commit
60642c8591
2 changed files with 3 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue