mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-25 18:41:07 +00:00
[X11] Construct X11 Factory first if enabled
This allows us to use X11 on Windows and Mac, if explicitly requested by the user via `ToolkitOptions.Backend`.
This commit is contained in:
parent
9d840e5969
commit
e39e4fbb37
|
@ -53,9 +53,9 @@ namespace OpenTK.Platform
|
||||||
|
|
||||||
// Create regular platform backend
|
// Create regular platform backend
|
||||||
if (Configuration.RunningOnSdl2) Default = new SDL2.Sdl2Factory();
|
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.RunningOnWindows) Default = new Windows.WinFactory();
|
||||||
else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory();
|
else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory();
|
||||||
else if (Configuration.RunningOnX11) Default = new X11.X11Factory();
|
|
||||||
else Default = new UnsupportedPlatform();
|
else Default = new UnsupportedPlatform();
|
||||||
|
|
||||||
// Create embedded platform backend for EGL / OpenGL ES.
|
// Create embedded platform backend for EGL / OpenGL ES.
|
||||||
|
@ -70,9 +70,9 @@ namespace OpenTK.Platform
|
||||||
}
|
}
|
||||||
else if (Egl.Egl.IsSupported)
|
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.RunningOnMacOS) Embedded = new Egl.EglMacPlatformFactory();
|
||||||
else if (Configuration.RunningOnX11) Embedded = new Egl.EglX11PlatformFactory();
|
|
||||||
else Embedded = new UnsupportedPlatform();
|
else Embedded = new UnsupportedPlatform();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue