mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 04:15:08 -04:00
Fix Aurora event processing (fix exit)
This commit is contained in:
+14
-2
@@ -176,8 +176,18 @@ void main01(void) {
|
||||
do {
|
||||
// 1. Update Window Events
|
||||
const AuroraEvent* event = aurora_update();
|
||||
if (event && event->type == AURORA_EXIT)
|
||||
break;
|
||||
while (true) {
|
||||
switch (event->type) {
|
||||
case AURORA_NONE:
|
||||
goto eventsDone;
|
||||
case AURORA_EXIT:
|
||||
goto exit;
|
||||
}
|
||||
|
||||
event++;
|
||||
}
|
||||
|
||||
eventsDone:;
|
||||
|
||||
static u32 frame = 0;
|
||||
frame++;
|
||||
@@ -202,6 +212,8 @@ void main01(void) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(16));
|
||||
|
||||
} while (true);
|
||||
|
||||
exit:;
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user