From 92821b4aefa2173605309d9a42fe1b5e75bb56d7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 7 Feb 2023 10:44:03 -0800
Subject: [PATCH] Round the refresh rate for SDL2
https://github.com/libsdl-org/SDL/pull/7261#issuecomment-1421255657
---
src/sdl2_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 98370a3..ab8a291 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -3366,7 +3366,7 @@ DisplayMode_3to2(const SDL_DisplayMode *in, SDL2_DisplayMode *out) {
out->format = in->format;
out->w = in->screen_w;
out->h = in->screen_h;
- out->refresh_rate = (int) SDL3_ceil(in->refresh_rate);
+ out->refresh_rate = (int) SDL3_lroundf(in->refresh_rate);
out->driverdata = in->driverdata;
}
}