From 9ccb301c04d51fecabcbe9a36f30fd35f65dc59f Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 25 Jan 2008 10:23:17 +0000 Subject: [PATCH] Refresh rate may be zero. --- Source/OpenTK/Graphics/DisplayResolution.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Graphics/DisplayResolution.cs b/Source/OpenTK/Graphics/DisplayResolution.cs index 1cf62357..b2f2d32a 100644 --- a/Source/OpenTK/Graphics/DisplayResolution.cs +++ b/Source/OpenTK/Graphics/DisplayResolution.cs @@ -24,10 +24,11 @@ namespace OpenTK.Graphics internal DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate) { + // Refresh rate may be zero, since this information may not be available on some platforms. if (width <= 0) throw new ArgumentOutOfRangeException("width", "Must be greater than zero."); if (height <= 0) throw new ArgumentOutOfRangeException("height", "Must be greater than zero."); if (bitsPerPixel <= 0) throw new ArgumentOutOfRangeException("bitsPerPixel", "Must be greater than zero."); - if (refreshRate <= 0) throw new ArgumentOutOfRangeException("refreshRate", "Must be greater than zero."); + if (refreshRate < 0) throw new ArgumentOutOfRangeException("refreshRate", "Must be greater than zero."); this.width = width; this.height = height;