Define the unit to match _EGLMode's.
struct native_mode {
const char *desc;
int width, height;
- int refresh_rate;
+ int refresh_rate; /* HZ * 1000 */
};
/**
drmmode->base.height = drmmode->mode.vdisplay;
drmmode->base.refresh_rate = drmmode->mode.vrefresh;
/* not all kernels have vrefresh = refresh_rate * 1000 */
- if (drmmode->base.refresh_rate > 1000)
- drmmode->base.refresh_rate = (drmmode->base.refresh_rate + 500) / 1000;
+ if (drmmode->base.refresh_rate < 1000)
+ drmmode->base.refresh_rate *= 1000;
}
nmodes_return = MALLOC(count * sizeof(*nmodes_return));