/// <summary> /// Fixes issues specific to the current platform. /// </summary> private void FixPlatformSpecificIssues() { SDL_SysWMinfo sysInfo; SDLMacro.SDL_VERSION(&sysInfo.version); if (!SDL.GetWindowWMInfo(ptr, &sysInfo)) { return; } switch (sysInfo.subsystem) { case SDL_SysWMType.WINDOWS: FixPlatformSpecificIssues_Windows(ref sysInfo); break; } }
/// <summary> /// Retrieves the HWND value for this window on the Windows platform. /// </summary> private Boolean GetHwnd(out IntPtr hwnd) { if (Ultraviolet.Platform != UltravioletPlatform.Windows) { throw new NotSupportedException(); } SDL_SysWMinfo sysInfo; SDLMacro.SDL_VERSION(&sysInfo.version); if (!SDL.GetWindowWMInfo(ptr, &sysInfo)) { hwnd = IntPtr.Zero; return(false); } hwnd = sysInfo.info.win.window; return(true); }