From b98a730413bc866c1fa7117f69a016d693cd91b1 Mon Sep 17 00:00:00 2001 From: pstef Date: Wed, 9 Apr 2025 22:22:00 +0200 Subject: [PATCH] Use fabsf and intended threshold for refresh rate check (#17791) Discussed with sonninnos Co-authored-by: pstef <3462925+pstef@users.noreply.github.com> --- gfx/drivers_context/w_vk_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_context/w_vk_ctx.c b/gfx/drivers_context/w_vk_ctx.c index 2e0b946976..caaaae4869 100644 --- a/gfx/drivers_context/w_vk_ctx.c +++ b/gfx/drivers_context/w_vk_ctx.c @@ -96,7 +96,7 @@ static void gfx_ctx_w_vk_check_window(void *data, bool *quit, if ( (win32_vk.flags & VK_DATA_FLAG_FULLSCREEN) && (g_win32_refresh_rate) && (g_win32_refresh_rate != refresh_rate) - && (abs(g_win32_refresh_rate - refresh_rate) > 0) + && (fabsf(g_win32_refresh_rate - refresh_rate) > 0.1f) && (g_win32_resize_width == *width) && (g_win32_resize_height == *height)) {