Skip to content

Commit 50c2fcf

Browse files
committed
Turns off sdl2 signal handling so ctrl+c works.
1 parent 6473ec6 commit 50c2fcf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

example.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ int main() {
5959
while (true) {
6060
/* SDL seems somewhat fragile, shut it down and bring it up */
6161
SDL_Quit();
62+
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1"); //so Ctrl-C still works
6263
SDL_Init(SDL_INIT_JOYSTICK);
6364

6465
/* poll for gamepad */

0 commit comments

Comments
 (0)