handle buttons

This commit is contained in:
Andy Killorin 2025-04-03 10:56:53 -04:00
parent 38cfc8567a
commit ba5421cadd
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

10
main.c
View file

@ -83,6 +83,16 @@ int main(void) {
IntMasterEnable();
while (true) {
// handle buttons
Button button = (Button) 0;
while (fifo_get(&button)) {
switch (button) {
case S2:
drawRequested = 1;
break;
}
}
GrContextForegroundSet(&sContext, ClrBlack);
GrRectFill(&sContext, &rectFullScreen); // fill screen with black