diff options
Diffstat (limited to 'examples/labyrinth.c')
-rwxr-xr-x | examples/labyrinth.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/labyrinth.c b/examples/labyrinth.c index 2c34054..ef0e96d 100755 --- a/examples/labyrinth.c +++ b/examples/labyrinth.c @@ -27,6 +27,12 @@ exit $? # */ #include "../reduced_system_layer.c" +void update_and_render_frame(void) { + p_handle_events(); + p_render_frame(); + p_sleep_for(0); +} + i32 main(i32 argc, c8 **argv) { (void) argc; (void) argv; @@ -37,14 +43,7 @@ i32 main(i32 argc, c8 **argv) { .frame_height = 720, }; - p_init(); - - while (!platform.done) { - p_handle_events(); - p_render_frame(); - p_sleep_for(0); - } + p_event_loop(); - p_cleanup(); return 0; } |