Module: wine Branch: master Commit: 775a2d5f4cc9a84bd9473d5fd81c67f29a62583f URL: https://gitlab.winehq.org/wine/wine/-/commit/775a2d5f4cc9a84bd9473d5fd81c67f...
Author: Zebediah Figura zfigura@codeweavers.com Date: Fri Jan 20 14:03:48 2023 -0600
winex11: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
---
dlls/winex11.drv/opengl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 783ac5f3a9d..92768267bae 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1687,8 +1687,12 @@ static int glxdrv_wglGetPixelFormat( HDC hdc ) { struct gl_drawable *gl; int ret = 0; + HWND hwnd;
- if ((gl = get_gl_drawable( NtUserWindowFromDC( hdc ), hdc ))) + if ((hwnd = NtUserWindowFromDC( hdc ))) + return win32u_get_window_pixel_format( hwnd ); + + if ((gl = get_gl_drawable( NULL, hdc ))) { ret = pixel_format_index( gl->format ); /* Offscreen formats can't be used with traditional WGL calls.