Added preproccessor switching for Win32 GTK3.
This commit is contained in:
parent
55dfd7a3c9
commit
80f8cdc63f
1 changed files with 9 additions and 1 deletions
|
@ -331,13 +331,21 @@ namespace OpenTK
|
|||
|
||||
IWindowInfo InitializeWindows()
|
||||
{
|
||||
#if GTK3
|
||||
IntPtr windowHandle = gdk_win32_window_get_handle(this.Window.Handle);
|
||||
#else
|
||||
IntPtr windowHandle = gdk_win32_drawable_get_handle(GdkWindow.Handle);
|
||||
#endif
|
||||
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")]
|
||||
public static extern IntPtr gdk_win32_drawable_get_handle(IntPtr d);
|
||||
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region OSX Specific Initialization
|
||||
|
|
Loading…
Reference in a new issue