From 12a1808e09915c9dfaeebdd3d4b91f104909d6f9 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 30 Jan 2013 20:37:42 -0300 Subject: [PATCH] ubb-la/gui.c (gui): fix the event loop to properly ignore unrecognized events --- ubb-la/gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubb-la/gui.c b/ubb-la/gui.c index 5c7a7c2..0c0f3f7 100644 --- a/ubb-la/gui.c +++ b/ubb-la/gui.c @@ -216,7 +216,7 @@ void gui(const uint8_t *buf, int skip, int nibbles) show_buffer(buf, skip, nibbles, CH_XOFF, XRES, zoom, pos); update(); - do { + while (1) { SDL_WaitEvent(&event); switch (event.type) { case SDL_KEYDOWN: @@ -242,7 +242,7 @@ void gui(const uint8_t *buf, int skip, int nibbles) default: continue; } + break; } - while (0); } }