diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index e3f8497fc..ba28001f8 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -264,8 +264,8 @@ CheckXRandR(Display * display, int *major, int *minor) static int CalculateXRandRRefreshRate(const XRRModeInfo *info) { - return (info->hTotal - && info->vTotal) ? (info->dotClock / (info->hTotal * info->vTotal)) : 0; + return (info->hTotal && info->vTotal) ? + round(((double)info->dotClock / (double)(info->hTotal * info->vTotal))) : 0; } static SDL_bool