Skip to content

Commit

Permalink
Make ex_keyboard_events not quit when the Escape key is pressed.
Browse files Browse the repository at this point in the history
  • Loading branch information
SiegeLordEx authored and SiegeLord committed Nov 30, 2024
1 parent 6001127 commit 77c905b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions examples/ex_keyboard_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'. */
Expand All @@ -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;

Expand Down Expand Up @@ -142,8 +138,6 @@ int main(int argc, char **argv)

main_loop();

close_log(false);

return 0;
}

Expand Down

0 comments on commit 77c905b

Please sign in to comment.