Changed to signed
This commit is contained in:
parent
eac603bfdf
commit
409065ba2e
|
@ -249,8 +249,8 @@ static struct wlr_output_impl output_impl = {
|
||||||
.destroy = wlr_drm_output_destroy,
|
.destroy = wlr_drm_output_destroy,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint32_t calculate_refresh_rate(drmModeModeInfo *mode) {
|
static int32_t calculate_refresh_rate(drmModeModeInfo *mode) {
|
||||||
uint32_t refresh = (mode->clock * 1000000LL / mode->htotal +
|
int32_t refresh = (mode->clock * 1000000LL / mode->htotal +
|
||||||
mode->vtotal / 2) / mode->vtotal;
|
mode->vtotal / 2) / mode->vtotal;
|
||||||
|
|
||||||
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
|
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->refresh = calculate_refresh_rate(&_state->mode);
|
||||||
mode->state = _state;
|
mode->state = _state;
|
||||||
|
|
||||||
wlr_log(L_INFO, " %"PRIu32"@%"PRIu32"@%"PRIu32,
|
wlr_log(L_INFO, " %"PRId32"@%"PRId32"@%"PRId32,
|
||||||
mode->width, mode->height, mode->refresh);
|
mode->width, mode->height, mode->refresh);
|
||||||
|
|
||||||
list_add(wlr_output->modes, mode);
|
list_add(wlr_output->modes, mode);
|
||||||
|
|
|
@ -10,8 +10,8 @@ struct wlr_output_mode_state;
|
||||||
struct wlr_output_mode {
|
struct wlr_output_mode {
|
||||||
struct wlr_output_mode_state *state;
|
struct wlr_output_mode_state *state;
|
||||||
uint32_t flags; // enum wl_output_mode
|
uint32_t flags; // enum wl_output_mode
|
||||||
uint32_t width, height;
|
int32_t width, height;
|
||||||
uint32_t refresh; // mHz
|
int32_t refresh; // mHz
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_output_impl;
|
struct wlr_output_impl;
|
||||||
|
|
Loading…
Reference in New Issue