From fa3362cc665eac427a81e0cc4b9939e2fbb6954d Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Wed, 20 Nov 2024 17:12:01 +0100 Subject: [PATCH] wait for events to reduce cpu usage --- src/main.c3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c3 b/src/main.c3 index ed5d5b4..5440370 100644 --- a/src/main.c3 +++ b/src/main.c3 @@ -14,7 +14,8 @@ fn int main(String[] args) rl::set_config_flags(rl::FLAG_WINDOW_RESIZABLE); rl::init_window(width, height, "Ugui Test"); ui.input_window_size(width, height)!!; - rl::set_target_fps(30); + rl::set_target_fps(60); + rl::enable_event_waiting(); isz frame;