From c64efeb9420de79bd82ab3e2257dacfce2cafa96 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 24 Jan 2008 10:52:12 +0000 Subject: [PATCH] Refresh rate is now considered a match, if it is less than 1.0Hz away of the specified value. --- Source/OpenTK/Graphics/DisplayDevice.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/Graphics/DisplayDevice.cs b/Source/OpenTK/Graphics/DisplayDevice.cs index 96d50455..a9b21fdf 100644 --- a/Source/OpenTK/Graphics/DisplayDevice.cs +++ b/Source/OpenTK/Graphics/DisplayDevice.cs @@ -148,7 +148,7 @@ namespace OpenTK.Graphics ((width > 0 && width == test.Width) || width == 0) && ((height > 0 && height == test.Height) || height == 0) && ((bitsPerPixel > 0 && bitsPerPixel == test.BitsPerPixel) || bitsPerPixel == 0) && - ((refreshRate > 0 && (int)refreshRate == (int)test.RefreshRate) || refreshRate == 0); + ((refreshRate > 0 && System.Math.Abs(refreshRate - test.RefreshRate) < 1.0) || refreshRate == 0); }); }