--- a/test/snake.c Tue Apr 16 22:06:17 2024 +0200 +++ b/test/snake.c Tue Apr 16 22:20:17 2024 +0200 @@ -100,7 +100,12 @@ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Fatal Error", asc_get_error(), window->window); asc_clear_error(); - break; + asc_context_quit(); + } + + // quit application on ESC key press + if (asc_key_pressed(ESCAPE)) { + asc_context_quit(); } } while (asc_loop_next());