| 63 | } |
| 64 | |
| 65 | bool uiUpdate(void) |
| 66 | { |
| 67 | // Read input state |
| 68 | hidScanInput(); |
| 69 | hidTouchRead(&g_touchPos); |
| 70 | hidCstickRead(&g_cstickPos); |
| 71 | g_cstickPos.dx = iabs(g_cstickPos.dx)<5 ? 0 : g_cstickPos.dx; |
| 72 | g_cstickPos.dy = iabs(g_cstickPos.dy)<5 ? 0 : g_cstickPos.dy; |
| 73 | |
| 74 | const uiStateInfo_s* ui; |
| 75 | |
| 76 | // Update background |
| 77 | ui = g_uiStateBg; |
| 78 | if (ui->update) ui->update(); |
| 79 | |
| 80 | if (!s_stateBusy) |
| 81 | { |
| 82 | // Update current state |
| 83 | ui = uiGetStateInfo(); |
| 84 | if (ui->update) ui->update(); |
| 85 | } |
| 86 | |
| 87 | return !s_shouldExit; |
| 88 | } |
no test coverage detected