Skip to content

Commit

Permalink
Add a back button function to raycast_game.c
Browse files Browse the repository at this point in the history
You can now press the back button to leave the raycast game.
  • Loading branch information
redlink2 authored Jun 14, 2022
1 parent a524cd6 commit f33ff45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion applications/raycast_game/raycast_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,16 @@ int32_t raycast_game_app(void* p) {
if(button_state & (1 << InputKeyUp) || button_state & (1 << InputKeyDown)) {
move_player(player, button_state & (1 << InputKeyUp));
}

if(button_state & (1 << InputKeyBack)) {
processing = false;
}

return true;
});
}

raycast_game_free(game);

return 0;
}
}

0 comments on commit f33ff45

Please sign in to comment.