test/snake.c

changeset 63
e3cacdd636e4
parent 62
5a592625e2f9
child 65
9c44c55d327a
     1.1 --- a/test/snake.c	Tue Apr 16 22:06:17 2024 +0200
     1.2 +++ b/test/snake.c	Tue Apr 16 22:20:17 2024 +0200
     1.3 @@ -100,7 +100,12 @@
     1.4              SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
     1.5                      "Fatal Error", asc_get_error(), window->window);
     1.6              asc_clear_error();
     1.7 -            break;
     1.8 +            asc_context_quit();
     1.9 +        }
    1.10 +
    1.11 +        // quit application on ESC key press
    1.12 +        if (asc_key_pressed(ESCAPE)) {
    1.13 +            asc_context_quit();
    1.14          }
    1.15      } while (asc_loop_next());
    1.16  

mercurial