diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-11-02 04:08:54 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-11-02 04:08:54 +0100 |
commit | aaa61a3eeb5b1ade783b5a7ec31a6a7fd6b3393e (patch) | |
tree | a187f9e503c3c5a8573a04b05a75c34cf6d8e716 /examples/labyrinth.c | |
parent | 48c5d9b83afd1cd56e73449aebaf461cb48360d9 (diff) | |
download | reduced_system_layer-aaa61a3eeb5b1ade783b5a7ec31a6a7fd6b3393e.zip |
Update examples
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; } |