From 536d48b4be5e5eefa58b184f98ec356ffee79b0d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 17 Sep 2021 13:45:24 +0200 Subject: [PATCH] gdi32: Directly call dib driver functions in dibdrv_wglCreateContext. Signed-off-by: Jacek Caban Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/gdi32/dibdrv/dc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 8b2eb6a7480..0ff4688b170 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -469,21 +469,6 @@ static BOOL WINAPI dibdrv_wglCopyContext( struct wgl_context *src, struct wgl_co return FALSE; } -/*********************************************************************** - * dibdrv_wglCreateContext - */ -static struct wgl_context * WINAPI dibdrv_wglCreateContext( HDC hdc ) -{ - PIXELFORMATDESCRIPTOR descr; - int format = GetPixelFormat( hdc ); - - if (!format) format = 1; - if (!DescribePixelFormat( hdc, format, sizeof(descr), &descr )) return NULL; - - if (!osmesa_funcs) return NULL; - return osmesa_funcs->create_context( hdc, &descr ); -} - /*********************************************************************** * dibdrv_wglDeleteContext */ @@ -509,6 +494,21 @@ static int WINAPI dibdrv_wglGetPixelFormat( HDC hdc ) return ret; } +/*********************************************************************** + * dibdrv_wglCreateContext + */ +static struct wgl_context * WINAPI dibdrv_wglCreateContext( HDC hdc ) +{ + PIXELFORMATDESCRIPTOR descr; + int format = dibdrv_wglGetPixelFormat( hdc ); + + if (!format) format = 1; + if (!dibdrv_wglDescribePixelFormat( hdc, format, sizeof(descr), &descr )) return NULL; + + if (!osmesa_funcs) return NULL; + return osmesa_funcs->create_context( hdc, &descr ); +} + /*********************************************************************** * dibdrv_wglGetProcAddress */