mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 11:15:29 +00:00
Make Mono use X11GdiPlusInternals regardless of platform.
This commit is contained in:
parent
64dfa91678
commit
44240ad598
|
@ -26,10 +26,10 @@ namespace OpenTK.Platform
|
||||||
|
|
||||||
static GdiPlus()
|
static GdiPlus()
|
||||||
{
|
{
|
||||||
if (Configuration.RunningOnWindows)
|
if (Configuration.RunningOnWindows && !Configuration.RunningOnMono)
|
||||||
internals = new Windows.WinGdiPlusInternals();
|
internals = new Windows.WinGdiPlusInternals();
|
||||||
else
|
else
|
||||||
internals = new X11.X11GdiPlusInternals();
|
internals = new X11.X11GdiPlusInternals(); // This class is Mono-specific and works on all platforms.
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -14,6 +14,8 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenTK.Platform.X11
|
namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
|
// Note: This class is Mono-specific, not X11-specific!
|
||||||
|
// It works on all platforms (windows, linux, macos) as long as we are running on Mono.
|
||||||
class X11GdiPlusInternals : IGdiPlusInternals
|
class X11GdiPlusInternals : IGdiPlusInternals
|
||||||
{
|
{
|
||||||
static readonly PropertyInfo native_graphics_property, native_font_property, native_string_format_property;
|
static readonly PropertyInfo native_graphics_property, native_font_property, native_string_format_property;
|
||||||
|
|
Loading…
Reference in a new issue