Module: wine Branch: master Commit: 899f010232c1ace8d6963d85b673803aaa6da520 URL: https://gitlab.winehq.org/wine/wine/-/commit/899f010232c1ace8d6963d85b673803...
Author: Zebediah Figura zfigura@codeweavers.com Date: Fri Jan 20 14:16:59 2023 -0600
wineandroid: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
---
dlls/wineandroid.drv/opengl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index 41df3d3c09c..37e9c713fb1 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -497,8 +497,14 @@ static int android_wglGetPixelFormat( HDC hdc ) { struct gl_drawable *gl; int ret = 0; + HWND hwnd; + + if ((hwnd = NtUserWindowFromDC( hdc ))) + return win32u_get_window_pixel_format( hwnd );
- if ((gl = get_gl_drawable( NtUserWindowFromDC( hdc ), hdc ))) + /* This code is currently dead, but will be necessary if WGL_ARB_pbuffer + * support is introduced. */ + if ((gl = get_gl_drawable( NULL, hdc ))) { ret = gl->format; /* offscreen formats can't be used with traditional WGL calls */