Henri Verbeet : wined3d: Call wglGetPixelFormat() through the gl_ops table.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 4 09:40:40 CST 2015


Module: wine
Branch: master
Commit: b53256b8b752855576252cc2290dfbc9cb0f1280
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b53256b8b752855576252cc2290dfbc9cb0f1280

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Nov  4 00:02:49 2015 +0100

wined3d: Call wglGetPixelFormat() through the gl_ops table.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 13b8471..1692d0d 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -820,7 +820,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
     if (dc == context->hdc && context->hdc_is_private && context->hdc_has_format)
         return TRUE;
 
-    current = GetPixelFormat(dc);
+    current = gl_info->gl_ops.wgl.p_wglGetPixelFormat(dc);
     if (current == format) goto success;
 
     if (!current)
@@ -1219,7 +1219,7 @@ static void context_enter(struct wined3d_context *context)
             context->needs_set = 1;
         }
         else if (!context->needs_set && !(context->hdc_is_private && context->hdc_has_format)
-                    && context->pixel_format != GetPixelFormat(context->hdc))
+                    && context->pixel_format != context->gl_info->gl_ops.wgl.p_wglGetPixelFormat(context->hdc))
             context->needs_set = 1;
     }
 }
@@ -1588,10 +1588,10 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
         goto out;
     }
 
-    context_enter(ret);
-
     ret->gl_info = gl_info;
 
+    context_enter(ret);
+
     if (!context_set_pixel_format(ret, hdc, hdc_is_private, pixel_format))
     {
         ERR("Failed to set pixel format %d on device context %p.\n", pixel_format, hdc);




More information about the wine-cvs mailing list