aboutsummaryrefslogtreecommitdiff
path: root/src/picow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/picow.c')
-rw-r--r--src/picow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/picow.c b/src/picow.c
index 97e9539..b6f655e 100644
--- a/src/picow.c
+++ b/src/picow.c
@@ -172,9 +172,14 @@ SDL_AppResult SDL_AppIterate(void *appstate) {
}
if (state->scene == PW_SCENE_GAME) {
- if (!pw_game_iterate(state->game)) {
+ bool shutdown;
+ if (!pw_game_iterate(state->game, &shutdown)) {
return failf("failed to update PICO-8 game state");
}
+
+ if (shutdown) {
+ state->scene = PW_SCENE_CART_SELECTION;
+ }
}
bool ok = true;