diff --git a/Source/OpenTK/Platform/Factory.cs b/Source/OpenTK/Platform/Factory.cs index 14185d3b..9a701844 100644 --- a/Source/OpenTK/Platform/Factory.cs +++ b/Source/OpenTK/Platform/Factory.cs @@ -53,9 +53,9 @@ namespace OpenTK.Platform // Create regular platform backend if (Configuration.RunningOnSdl2) Default = new SDL2.Sdl2Factory(); + else if (Configuration.RunningOnX11) Default = new X11.X11Factory(); else if (Configuration.RunningOnWindows) Default = new Windows.WinFactory(); else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory(); - else if (Configuration.RunningOnX11) Default = new X11.X11Factory(); else Default = new UnsupportedPlatform(); // Create embedded platform backend for EGL / OpenGL ES. @@ -70,9 +70,9 @@ namespace OpenTK.Platform } else if (Egl.Egl.IsSupported) { - if (Configuration.RunningOnWindows) Embedded = new Egl.EglWinPlatformFactory(); + if (Configuration.RunningOnX11) Embedded = new Egl.EglX11PlatformFactory(); + else if (Configuration.RunningOnWindows) Embedded = new Egl.EglWinPlatformFactory(); else if (Configuration.RunningOnMacOS) Embedded = new Egl.EglMacPlatformFactory(); - else if (Configuration.RunningOnX11) Embedded = new Egl.EglX11PlatformFactory(); else Embedded = new UnsupportedPlatform(); } else