mirror of
https://github.com/emersion/wlr-randr
synced 2024-11-26 07:33:46 +01:00
Fix mode refresh rounding issue
Fix mode not being found when setting mode, even when copied and pasted from mode list.
This commit is contained in:
parent
988a802f5b
commit
1cc82e6950
3
main.c
3
main.c
@ -2,6 +2,7 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -429,7 +430,7 @@ static bool parse_mode(const char *value, int *width, int *height,
|
||||
return false;
|
||||
}
|
||||
|
||||
*refresh = refresh_hz * 1000; // Hz → mHz
|
||||
*refresh = round(refresh_hz * 1000); // Hz → mHz
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,11 +36,13 @@ add_project_arguments(cc.get_supported_arguments([
|
||||
|
||||
wayland_client = dependency('wayland-client')
|
||||
|
||||
math = cc.find_library('m', required: false)
|
||||
|
||||
subdir('protocol')
|
||||
|
||||
wlr_randr_exe = executable(
|
||||
meson.project_name(),
|
||||
files(['main.c']),
|
||||
dependencies: [wayland_client, client_protos],
|
||||
dependencies: [wayland_client, client_protos, math],
|
||||
install: true,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user