1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-23 20:33:45 +02:00

ubb-la/gui.c (gui): fix the event loop to properly ignore unrecognized events

This commit is contained in:
Werner Almesberger 2013-01-30 20:37:42 -03:00
parent 1b0a2cff51
commit 12a1808e09

View File

@ -216,7 +216,7 @@ void gui(const uint8_t *buf, int skip, int nibbles)
show_buffer(buf, skip, nibbles, CH_XOFF, XRES, zoom, pos); show_buffer(buf, skip, nibbles, CH_XOFF, XRES, zoom, pos);
update(); update();
do { while (1) {
SDL_WaitEvent(&event); SDL_WaitEvent(&event);
switch (event.type) { switch (event.type) {
case SDL_KEYDOWN: case SDL_KEYDOWN:
@ -242,7 +242,7 @@ void gui(const uint8_t *buf, int skip, int nibbles)
default: default:
continue; continue;
} }
break;
} }
while (0);
} }
} }