aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-01-07 13:33:28 +0100
committerdec05eba <dec05eba@protonmail.com>2023-01-07 13:33:28 +0100
commit293770707e12aa6b725e5ebaa30dc1aa80fdebc3 (patch)
treebb2d730caf83dfbbd853a44011decfcf4c8ab696 /tests
parent030b78f7056b35ab53765212ee3ce94c5835a975 (diff)
Window: add functions to set fullscreen state, vsync state
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/main.c b/tests/main.c
index ee632a7..2155181 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -297,6 +297,10 @@ int main(int argc, char **argv) {
} else {
fprintf(stderr, "Failed to copy clipboard!\n");
}
+ } else if(event.key.code == MGL_KEY_F) {
+ mgl_window_set_fullscreen(&window, !mgl_window_is_fullscreen(&window));
+ } else if(event.key.code == MGL_KEY_X) {
+ mgl_window_set_vsync_enabled(&window, !mgl_window_is_vsync_enabled(&window));
}
fprintf(stderr, "key press event, code: %u\n", event.key.code);
break;