From 672ccb4f540da7529af31d4f624b99d6475e39a0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 24 Mar 2015 14:36:36 -0400 Subject: [PATCH] Make the signal handler hint more generic. --- include/SDL_hints.h | 10 +++++----- src/events/SDL_quit.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/SDL_hints.h b/include/SDL_hints.h index 2ffeb3b3db30a..04a75f1a60dc7 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -547,16 +547,16 @@ extern "C" { #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" /** - * \brief Tell SDL not to handle SIGINT. + * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. * * This hint only applies to Unix-like platforms. * * The variable can be set to the following values: - * "0" - SDL will install a SIGINT handler, and when it catches the - * signal, conver it into an SDL_QUIT event. - * "1" - SDL will not install a SIGINT handler. + * "0" - SDL will install a SIGINT and SIGTERM handler, and when it + * catches a signal, convert it into an SDL_QUIT event. + * "1" - SDL will not install a signal handler at all. */ -#define SDL_HINT_DISABLE_SIGINT_HANDLER "SDL_DISABLE_SIGINT_HANDLER" +#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS" /** * \brief An enumeration of hint priorities diff --git a/src/events/SDL_quit.c b/src/events/SDL_quit.c index c1ece1c00af61..898e33a7383b6 100644 --- a/src/events/SDL_quit.c +++ b/src/events/SDL_quit.c @@ -49,7 +49,7 @@ SDL_HandleSIG(int sig) int SDL_QuitInit(void) { - const char *hint = SDL_GetHint(SDL_HINT_DISABLE_SIGINT_HANDLER); + const char *hint = SDL_GetHint(SDL_HINT_NO_SIGNAL_HANDLERS); disable_signals = hint && (SDL_atoi(hint) == 1); if (disable_signals) { return 0;