Fix Fluidsynth not responding to either SIGTERM nor SIGINT

with recent SDL2
This commit is contained in:
derselbst 2022-04-22 23:38:29 +02:00
parent 0771899e3f
commit 4ee4b0403e
1 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,8 @@ int main(int argc, char **argv)
#endif #endif
#if SDL2_SUPPORT #if SDL2_SUPPORT
// Tell SDL that it shouldn't intercept signals, otherwise SIGINT and SIGTERM won't quit fluidsynth
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1");
if(SDL_Init(SDL_INIT_AUDIO) != 0) if(SDL_Init(SDL_INIT_AUDIO) != 0)
{ {
fprintf(stderr, "Warning: Unable to initialize SDL2 Audio: %s", SDL_GetError()); fprintf(stderr, "Warning: Unable to initialize SDL2 Audio: %s", SDL_GetError());