mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 23:40:36 +02:00
ubb-la/gui.c (gui): fix the event loop to properly ignore unrecognized events
This commit is contained in:
parent
1b0a2cff51
commit
12a1808e09
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user