From aa1ba9f6eccf333a77babca8a6b357f3af5b7e6e Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 12 Nov 2021 02:05:39 +0100 Subject: [PATCH] make lowest resolutio check less strict --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index 2f957ce..8958fb1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -158,7 +158,7 @@ BOOL util_get_lowest_resolution( DWORD max_height) { BOOL result = FALSE; - int org_ratio = (int)((ratio + 0.005f) * 100); + int org_ratio = (int)((ratio + 0.005f) * 10); SIZE lowest = { .cx = max_width + 1, .cy = max_height + 1 }; DWORD i = 0; DEVMODE m; @@ -174,7 +174,7 @@ BOOL util_get_lowest_resolution( m.dmPelsWidth < lowest.cx && m.dmPelsHeight < lowest.cy) { - int res_ratio = (int)((((float)m.dmPelsWidth / m.dmPelsHeight) + 0.005f) * 100); + int res_ratio = (int)((((float)m.dmPelsWidth / m.dmPelsHeight) + 0.005f) * 10); if (res_ratio == org_ratio) {