aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-05-14 01:26:43 +1200
committerScott Anderson <ascent12@hotmail.com>2017-05-14 01:26:43 +1200
commit409065ba2ecd34d249383704f9a63b4894f55dba (patch)
tree39c0753b4d5aa7fdc61c1db0bc380559f050ba6a /backend/drm
parenteac603bfdf107daa1bb33568c8cc282713c31edd (diff)
Changed to signed
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 8a64dfa6..db75853d 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -249,8 +249,8 @@ static struct wlr_output_impl output_impl = {
.destroy = wlr_drm_output_destroy,
};
-static uint32_t calculate_refresh_rate(drmModeModeInfo *mode) {
- uint32_t refresh = (mode->clock * 1000000LL / mode->htotal +
+static int32_t calculate_refresh_rate(drmModeModeInfo *mode) {
+ int32_t refresh = (mode->clock * 1000000LL / mode->htotal +
mode->vtotal / 2) / mode->vtotal;
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -365,7 +365,7 @@ void wlr_drm_scan_connectors(struct wlr_backend_state *state) {
mode->refresh = calculate_refresh_rate(&_state->mode);
mode->state = _state;
- wlr_log(L_INFO, " %"PRIu32"@%"PRIu32"@%"PRIu32,
+ wlr_log(L_INFO, " %"PRId32"@%"PRId32"@%"PRId32,
mode->width, mode->height, mode->refresh);
list_add(wlr_output->modes, mode);