From 37ad5810882a3f2314375c5c2bf76a78b402f767 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 24 Jan 2008 21:20:59 +0000 Subject: [PATCH] Added platform detecion. --- Source/OpenTK/Graphics/DisplayDevice.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Graphics/DisplayDevice.cs b/Source/OpenTK/Graphics/DisplayDevice.cs index a9b21fdf..23f3e0b5 100644 --- a/Source/OpenTK/Graphics/DisplayDevice.cs +++ b/Source/OpenTK/Graphics/DisplayDevice.cs @@ -33,12 +33,23 @@ namespace OpenTK.Graphics static object display_lock = new object(); static DisplayDevice primary_display; - static IDisplayDeviceDriver implementation = new OpenTK.Platform.Windows.WinDisplayDeviceDriver(); + static IDisplayDeviceDriver implementation; #region --- Constructors --- static DisplayDevice() { + switch (System.Environment.OSVersion.Platform) + { + case PlatformID.Unix: + case (PlatformID)128: + implementation = null; + break; + + default: + implementation = new OpenTK.Platform.Windows.WinDisplayDeviceDriver(); + break; + } //lock (display_lock) //{ // int i = 0;