mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-18 08:27:25 +00:00
Added preproccessor switching for Win32 GTK3.
This commit is contained in:
parent
55dfd7a3c9
commit
80f8cdc63f
|
@ -331,13 +331,21 @@ namespace OpenTK
|
||||||
|
|
||||||
IWindowInfo InitializeWindows()
|
IWindowInfo InitializeWindows()
|
||||||
{
|
{
|
||||||
|
#if GTK3
|
||||||
|
IntPtr windowHandle = gdk_win32_window_get_handle(this.Window.Handle);
|
||||||
|
#else
|
||||||
IntPtr windowHandle = gdk_win32_drawable_get_handle(GdkWindow.Handle);
|
IntPtr windowHandle = gdk_win32_drawable_get_handle(GdkWindow.Handle);
|
||||||
|
#endif
|
||||||
return Utilities.CreateWindowsWindowInfo(windowHandle);
|
return Utilities.CreateWindowsWindowInfo(windowHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GTK3
|
||||||
|
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern IntPtr gdk_win32_window_get_handle(IntPtr w);
|
||||||
|
#else
|
||||||
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-win32-2.0-0.dll")]
|
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-win32-2.0-0.dll")]
|
||||||
public static extern IntPtr gdk_win32_drawable_get_handle(IntPtr d);
|
public static extern IntPtr gdk_win32_drawable_get_handle(IntPtr d);
|
||||||
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region OSX Specific Initialization
|
#region OSX Specific Initialization
|
||||||
|
|
Loading…
Reference in a new issue