From ddf1bfd2bd97ec353c937ced15400341edfc3ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Thu, 26 Oct 2023 09:38:50 +0200 Subject: [PATCH] improve engine_tick --- engine/joint/v4k.h | 3 ++- engine/split/v4k_editor.c | 3 ++- engine/v4k.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index fa69cd9..9ed88da 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -358839,7 +358839,7 @@ int engine_send(const char *cmd, const char *optional_value) { int engine_tick() { enum { engine_hz = 60 }; - enum { engine_hz_mid = 18 }; + enum { engine_hz_mid = 30 }; enum { engine_hz_low = 5 }; if( *engine_geti("powersave") ) { // adaptive framerate @@ -358848,6 +358848,7 @@ int engine_tick() { window_fps_lock( hz < 5 ? 5 : hz ); } else { // window_fps_lock( editor_hz ); + window_fps_unlock( ); } return 0; diff --git a/engine/split/v4k_editor.c b/engine/split/v4k_editor.c index 85b0262..b652656 100644 --- a/engine/split/v4k_editor.c +++ b/engine/split/v4k_editor.c @@ -176,7 +176,7 @@ int engine_send(const char *cmd, const char *optional_value) { int engine_tick() { enum { engine_hz = 60 }; - enum { engine_hz_mid = 18 }; + enum { engine_hz_mid = 30 }; enum { engine_hz_low = 5 }; if( *engine_geti("powersave") ) { // adaptive framerate @@ -185,6 +185,7 @@ int engine_tick() { window_fps_lock( hz < 5 ? 5 : hz ); } else { // window_fps_lock( editor_hz ); + window_fps_unlock( ); } return 0; diff --git a/engine/v4k.c b/engine/v4k.c index bd641fa..97a70c8 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -26863,7 +26863,7 @@ int engine_send(const char *cmd, const char *optional_value) { int engine_tick() { enum { engine_hz = 60 }; - enum { engine_hz_mid = 18 }; + enum { engine_hz_mid = 30 }; enum { engine_hz_low = 5 }; if( *engine_geti("powersave") ) { // adaptive framerate @@ -26872,6 +26872,7 @@ int engine_tick() { window_fps_lock( hz < 5 ? 5 : hz ); } else { // window_fps_lock( editor_hz ); + window_fps_unlock( ); } return 0;