From 825c768fab10e522da02f4691e7c193a7d294589 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Tue, 29 Sep 2026 13:34:25 +0200 Subject: [PATCH] Enabling vsync. --- core/host/linux/display.c | 2 +- core/host/windows/display.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/host/linux/display.c b/core/host/linux/display.c index ca8bc4c..9aae029 100644 --- a/core/host/linux/display.c +++ b/core/host/linux/display.c @@ -49,7 +49,7 @@ inline int display_init(void) return EXIT_FAILURE; } - if(!SDL_SetRenderVSync(game.display.renderer, SDL_RENDERER_VSYNC_ADAPTIVE)) + if(!SDL_SetRenderVSync(game.display.renderer, 1)) { error_printf("Failed to activate adaptative vsync : %s", SDL_GetError()); return EXIT_FAILURE; diff --git a/core/host/windows/display.c b/core/host/windows/display.c index 66008a0..2aa8a18 100644 --- a/core/host/windows/display.c +++ b/core/host/windows/display.c @@ -46,13 +46,13 @@ inline int display_init(void) error_printf("Failed to create renderer : %s", SDL_GetError()); return EXIT_FAILURE; } -/* - if(!SDL_SetRenderVSync(game.display.renderer, SDL_RENDERER_VSYNC_ADAPTIVE)) + + if(!SDL_SetRenderVSync(game.display.renderer, 1)) { error_printf("Failed to activate adaptative vsync : %s", SDL_GetError()); return EXIT_FAILURE; } -*/ + if(!SDL_SetRenderDrawBlendMode(game.display.renderer, SDL_BLENDMODE_BLEND)) { error_printf("Failed to set renderer draw blend mode : %s", SDL_GetError());