From: Mikko Rasa Date: Wed, 21 Oct 2015 10:02:16 +0000 (+0300) Subject: Use a tighter threshold when checking for duplicate modes X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=commitdiff_plain;h=8811d614b5deb1a0da4bef531db3fd6882469b99 Use a tighter threshold when checking for duplicate modes Some display devices offer modes with refresh rates very close to each other, such as 24.00 and 23.97. These differences may nevertheless be important for video content. --- diff --git a/source/graphics/x11/display.cpp b/source/graphics/x11/display.cpp index 50c6d57..b70c9a7 100644 --- a/source/graphics/x11/display.cpp +++ b/source/graphics/x11/display.cpp @@ -148,7 +148,7 @@ Display::Display(const string &disp_name): mode.index = modes.size(); mode.monitor = &monitor; mode.rate = static_cast(info->dotClock)/(info->hTotal*info->vTotal); - if(find_mode(mode)) + if(find_mode(mode, 0.01f)) continue; modes.push_back(mode);