diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-01-07 13:37:15 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-01-07 13:37:15 +0100 |
commit | 45e509ea8d21bf45df09deecc2e5a2f09751667b (patch) | |
tree | 93432ee6eca55ee70525a411ce669a02d32ee63d /src/window | |
parent | 5c002784679ede545977ef641db34d905f0249e3 (diff) |
Window: add functions to set fullscreen state, vsync state
Diffstat (limited to 'src/window')
-rw-r--r-- | src/window/Window.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 64ee9fe..512991a 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -93,6 +93,22 @@ namespace mgl { mgl_window_set_framerate_limit(&window, fps); } + void Window::set_vsync_enabled(bool enabled) { + mgl_window_set_vsync_enabled(&window, enabled); + } + + bool Window::is_vsync_enabled() const { + return mgl_window_is_vsync_enabled(&window); + } + + void Window::set_fullscreen(bool fullscreen) { + mgl_window_set_fullscreen(&window, fullscreen); + } + + bool Window::is_fullscreen() const { + return mgl_window_is_fullscreen(&window); + } + void Window::set_key_repeat_enabled(bool enabled) { mgl_window_set_key_repeat_enabled(&window, enabled); } |