mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/drm: don't insert duplicate custom modes, fix refresh rate
This commit is contained in:
parent
6d4bfa3226
commit
ff6c4f80b2
3 changed files with 11 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include "backend/drm/util.h"
|
||||
|
||||
int32_t calculate_refresh_rate(drmModeModeInfo *mode) {
|
||||
int32_t calculate_refresh_rate(const drmModeModeInfo *mode) {
|
||||
int32_t refresh = (mode->clock * 1000000LL / mode->htotal +
|
||||
mode->vtotal / 2) / mode->vtotal;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue