aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-08-25 11:03:02 +0200
committerdec05eba <dec05eba@protonmail.com>2023-08-25 11:03:02 +0200
commit5e50a5249f089f44b568e7dd4ba0782521e67e0b (patch)
tree90ccbe16b5df0d72d14a3fc82d9eb3940d0eaf39 /include
parenta6c350cd014fc57cefc4beb6698ac80781ca028c (diff)
Dont enable low latency mode by default since it increases cpu usage
Diffstat (limited to 'include')
-rw-r--r--include/mgl/window/window.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h
index 35b677d..cbcdb1a 100644
--- a/include/mgl/window/window.h
+++ b/include/mgl/window/window.h
@@ -48,12 +48,13 @@ struct mgl_window {
bool open;
bool focused;
bool key_repeat_enabled;
- bool vsync_enabled;
+ bool vsync_enabled; /* true by default */
double frame_time_limit;
double frame_time_limit_monitor;
mgl_clock frame_timer;
char *clipboard_string;
size_t clipboard_size;
+ bool low_latency; /* false by default */
mgl_monitor *monitors; /* TODO: Move these to mgl file */
int num_monitors;
@@ -132,6 +133,9 @@ void mgl_window_set_vsync_enabled(mgl_window *self, bool enabled);
bool mgl_window_is_vsync_enabled(const mgl_window *self);
void mgl_window_set_fullscreen(mgl_window *self, bool fullscreen);
bool mgl_window_is_fullscreen(const mgl_window *self);
+/* Enabling low latency may slightly increase cpu usage */
+void mgl_window_set_low_latency(mgl_window *self, bool low_latency);
+bool mgl_window_is_low_latency_enabled(const mgl_window *self);
void mgl_window_set_position(mgl_window *self, mgl_vec2i position);
void mgl_window_set_size(mgl_window *self, mgl_vec2i size);