handle buttons
This commit is contained in:
parent
38cfc8567a
commit
ba5421cadd
1 changed files with 10 additions and 0 deletions
10
main.c
10
main.c
|
@ -83,6 +83,16 @@ int main(void) {
|
||||||
IntMasterEnable();
|
IntMasterEnable();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
// handle buttons
|
||||||
|
Button button = (Button) 0;
|
||||||
|
while (fifo_get(&button)) {
|
||||||
|
switch (button) {
|
||||||
|
case S2:
|
||||||
|
drawRequested = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GrContextForegroundSet(&sContext, ClrBlack);
|
GrContextForegroundSet(&sContext, ClrBlack);
|
||||||
GrRectFill(&sContext, &rectFullScreen); // fill screen with black
|
GrRectFill(&sContext, &rectFullScreen); // fill screen with black
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue