mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
3
glfw/x11_monitor.c
vendored
3
glfw/x11_monitor.c
vendored
@@ -30,6 +30,7 @@
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
// Check whether the display mode should be included in enumeration
|
||||
@@ -44,7 +45,7 @@ static GLFWbool modeIsGood(const XRRModeInfo* mi)
|
||||
static int calculateRefreshRate(const XRRModeInfo* mi)
|
||||
{
|
||||
if (mi->hTotal && mi->vTotal)
|
||||
return (int) ((double) mi->dotClock / ((double) mi->hTotal * (double) mi->vTotal));
|
||||
return (int) round((double) mi->dotClock / ((double) mi->hTotal * (double) mi->vTotal));
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user