From 1b3907f232d2a37d25408066770173c8057c94ac Mon Sep 17 00:00:00 2001 From: briaguya Date: Mon, 23 May 2022 14:41:38 -0400 Subject: [PATCH] use _Exit(0) on linux --- libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp | 5 +++++ libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp index d450558b2..815e3fb19 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_glx.cpp @@ -440,7 +440,12 @@ static void gfx_glx_handle_events(void) { } } if (xev.type == ClientMessage && (Atom)xev.xclient.data.l[0] == glx.atom_wm_delete_window) { + #ifndef __linux__ exit(0); + #endif + #ifdef __linux__ + _Exit(0); + #endif } } } diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp index e80097c81..87249ed31 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp @@ -250,7 +250,12 @@ static void gfx_sdl_handle_events(void) { } break; case SDL_QUIT: + #ifndef __linux__ exit(0); + #endif + #ifdef __linux__ + _Exit(0); + #endif } } }