Added platform detecion.
This commit is contained in:
parent
69a1168f3d
commit
37ad581088
1 changed files with 12 additions and 1 deletions
|
@ -33,12 +33,23 @@ namespace OpenTK.Graphics
|
||||||
static object display_lock = new object();
|
static object display_lock = new object();
|
||||||
static DisplayDevice primary_display;
|
static DisplayDevice primary_display;
|
||||||
|
|
||||||
static IDisplayDeviceDriver implementation = new OpenTK.Platform.Windows.WinDisplayDeviceDriver();
|
static IDisplayDeviceDriver implementation;
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
static DisplayDevice()
|
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)
|
//lock (display_lock)
|
||||||
//{
|
//{
|
||||||
// int i = 0;
|
// int i = 0;
|
||||||
|
|
Loading…
Reference in a new issue