From 293770707e12aa6b725e5ebaa30dc1aa80fdebc3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 7 Jan 2023 13:33:28 +0100 Subject: Window: add functions to set fullscreen state, vsync state --- tests/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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; -- cgit v1.2.3