aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mglpp/window/Window.hpp3
-rw-r--r--src/window/Window.cpp8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp
index 2f148e7..c90f89e 100644
--- a/include/mglpp/window/Window.hpp
+++ b/include/mglpp/window/Window.hpp
@@ -75,6 +75,9 @@ namespace mgl {
bool is_vsync_enabled() const;
void set_fullscreen(bool fullscreen);
bool is_fullscreen() const;
+ // Enabling low latency may slightly increase cpu usage
+ void set_low_latency(bool low_latency);
+ bool is_low_latency_enabled() const;
void set_key_repeat_enabled(bool enabled);
void set_cursor_visible(bool visible);
vec2i get_size() const;
diff --git a/src/window/Window.cpp b/src/window/Window.cpp
index 512991a..d519e2f 100644
--- a/src/window/Window.cpp
+++ b/src/window/Window.cpp
@@ -109,6 +109,14 @@ namespace mgl {
return mgl_window_is_fullscreen(&window);
}
+ void Window::set_low_latency(bool low_latency) {
+ mgl_window_set_low_latency(&window, low_latency);
+ }
+
+ bool Window::is_low_latency_enabled() const {
+ return mgl_window_is_low_latency_enabled(&window);
+ }
+
void Window::set_key_repeat_enabled(bool enabled) {
mgl_window_set_key_repeat_enabled(&window, enabled);
}