Refresh rate may be zero.
This commit is contained in:
parent
f4beb31381
commit
9ccb301c04
1 changed files with 2 additions and 1 deletions
|
@ -24,10 +24,11 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
internal DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
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 (width <= 0) throw new ArgumentOutOfRangeException("width", "Must be greater than zero.");
|
||||||
if (height <= 0) throw new ArgumentOutOfRangeException("height", "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 (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.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
|
|
Loading…
Reference in a new issue