From 77c905b1d3b5359cb38401bf6819848300230009 Mon Sep 17 00:00:00 2001 From: Pavel Sountsov Date: Sat, 30 Nov 2024 11:55:29 -0800 Subject: [PATCH] Make ex_keyboard_events not quit when the Escape key is pressed. --- examples/ex_keyboard_events.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/ex_keyboard_events.c b/examples/ex_keyboard_events.c index 3d516bd279..5d720f0ee4 100644 --- a/examples/ex_keyboard_events.c +++ b/examples/ex_keyboard_events.c @@ -47,7 +47,6 @@ static void main_loop(void) ALLEGRO_EVENT event; log_printf("Focus on the main window (black) and press keys to see events. "); - log_printf("Escape quits.\n\n"); while (true) { /* Take the next event out of the event queue, and store it in `event'. */ @@ -66,9 +65,6 @@ static void main_loop(void) /* ALLEGRO_EVENT_KEY_DOWN - a keyboard key was pressed. */ case ALLEGRO_EVENT_KEY_DOWN: - if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE) { - return; - } log_key("KEY_DOWN", event.keyboard.keycode, 0, 0); break; @@ -142,8 +138,6 @@ int main(int argc, char **argv) main_loop(); - close_log(false); - return 0; }