]> git.tdb.fi Git - libs/gui.git/commitdiff
Use a tighter threshold when checking for duplicate modes
authorMikko Rasa <tdb@tdb.fi>
Wed, 21 Oct 2015 10:02:16 +0000 (13:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 21 Oct 2015 10:02:16 +0000 (13:02 +0300)
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.

source/graphics/x11/display.cpp

index 50c6d57a706ee707f24085754c87eebb3672a016..b70c9a7c197866179a95b26bf4aae26d7e3d16bd 100644 (file)
@@ -148,7 +148,7 @@ Display::Display(const string &disp_name):
                                        mode.index = modes.size();
                                        mode.monitor = &monitor;
                                        mode.rate = static_cast<float>(info->dotClock)/(info->hTotal*info->vTotal);
-                                       if(find_mode(mode))
+                                       if(find_mode(mode, 0.01f))
                                                continue;
 
                                        modes.push_back(mode);