From fd8a1cb38bbf53c13bb1c1041830f20949bd19c5 Mon Sep 17 00:00:00 2001 From: mahoneyt944 <49591133+mahoneyt944@users.noreply.github.com> Date: Thu, 8 Aug 2024 07:05:32 -0400 Subject: [PATCH] Fix sigterm --- frontend/drivers/platform_unix.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c index 8877c256479..3a9df2c65a9 100644 --- a/frontend/drivers/platform_unix.c +++ b/frontend/drivers/platform_unix.c @@ -2507,11 +2507,16 @@ static uint64_t frontend_unix_get_free_mem(void) static void frontend_unix_sighandler(int sig) { #ifdef VALGRIND_PRINTF_BACKTRACE -VALGRIND_PRINTF_BACKTRACE("SIGINT"); + VALGRIND_PRINTF_BACKTRACE("SIGINT"); #endif (void)sig; unix_sighandler_quit++; - if (unix_sighandler_quit == 1) {} + if (unix_sighandler_quit == 1) + { +#if defined(HAVE_SDL_DINGUX) + retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL); +#endif + } if (unix_sighandler_quit == 2) exit(1); /* in case there's a second deadlock in a C++ destructor or something */ if (unix_sighandler_quit >= 3) abort();