From 7b591ccd4b3b56d10f42a45324247d259fe97c93 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 6 Sep 2025 08:18:34 +0800 Subject: [PATCH] opt: more fuzzy monitor mode matching --- src/mango.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mango.c b/src/mango.c index d7f2546..3124284 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2456,7 +2456,7 @@ struct wlr_output_mode *get_output_mode(struct wlr_output *output, int width, struct wlr_output_mode *mode; wl_list_for_each(mode, &output->modes, link) { if (mode->width == width && mode->height == height && - (int)(mode->refresh / 1000) == (int)refresh) { + (int)round(mode->refresh / 1000) == (int)round(refresh)) { return mode; } }