aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-02-15 20:38:06 +0100
committerdec05eba <dec05eba@protonmail.com>2021-02-15 20:38:06 +0100
commit12fcafcb346462adf99a8bd98895d0d4405bc257 (patch)
treeedfe7f923f0c990a37381be76594b5b78f63ec4c
parentd41a1b592bdcea09f708b2b0e6fa0972d19dfd40 (diff)
test: Enable vsync with sfml instead of custom
-rw-r--r--src/QuickMedia.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index f6d036e..c966b8c 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -386,12 +386,16 @@ namespace QuickMedia {
window.setFramerateLimit(0);
monitor_hz = get_monitor_max_hz(disp);
+ window.setVerticalSyncEnabled(true);
+ vsync_set = true;
+ /*
if(enable_vsync(disp, window.getSystemHandle())) {
vsync_set = true;
} else {
fprintf(stderr, "Failed to enable vsync, fallback to frame limiting\n");
window.setFramerateLimit(monitor_hz);
}
+ */
fprintf(stderr, "Monitor hz: %d\n", monitor_hz);
if(create_directory_recursive(get_cache_dir().join("thumbnails")) != 0) {