st/egl: Fix native_mode refresh mode.

Define the unit to match _EGLMode's.
This commit is contained in:
Chia-I Wu
2010-10-23 11:31:29 +08:00
parent e32ac5b8a9
commit 662e098b56
2 changed files with 3 additions and 3 deletions
@@ -39,7 +39,7 @@ struct native_connector {
struct native_mode {
const char *desc;
int width, height;
int refresh_rate;
int refresh_rate; /* HZ * 1000 */
};
/**
+2 -2
View File
@@ -469,8 +469,8 @@ drm_display_get_modes(struct native_display *ndpy,
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));