Skip to content

Instantly share code, notes, and snippets.

@intervigilium
Last active December 11, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intervigilium/4553809 to your computer and use it in GitHub Desktop.
Save intervigilium/4553809 to your computer and use it in GitHub Desktop.
Napoleon: Total War SetPixelFormat patch for Wine 1.5
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 3a6a2c7..86d182a 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1642,7 +1642,7 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM
TRACE("(%p,%d,%p)\n", hdc, iPixelFormat, ppfd);
- if (!hwnd || hwnd == GetDesktopWindow())
+ if (!hwnd)
{
WARN( "not a proper window DC %p/%p\n", hdc, hwnd );
return FALSE;
@@ -2956,7 +2956,7 @@ static BOOL X11DRV_wglSetPixelFormatWINE(HDC hdc, int format)
}
hwnd = WindowFromDC( hdc );
- if (!hwnd || hwnd == GetDesktopWindow())
+ if (!hwnd)
{
ERR( "not a valid window DC %p\n", hdc );
return FALSE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment