[nostalgia] Make core::shutdown return void and add GBA implementation
This commit is contained in:
@@ -20,7 +20,7 @@ UpdateHandler g_updateHandler = nullptr;
|
||||
|
||||
ox::Error run(Context *ctx) noexcept {
|
||||
g_wakeupTime = 0;
|
||||
while (1) {
|
||||
while (ctx->running) {
|
||||
if (g_wakeupTime <= g_timerMs && g_updateHandler) {
|
||||
auto sleepTime = g_updateHandler(ctx);
|
||||
if (sleepTime >= 0) {
|
||||
|
||||
@@ -59,4 +59,8 @@ bool buttonDown(Context*, Key k) noexcept {
|
||||
return !(REG_GAMEPAD & (1 << static_cast<int>(k)));
|
||||
}
|
||||
|
||||
void shutdown(Context *ctx) noexcept {
|
||||
ctx->running = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user