[PATCH 3/8] Revert "wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire()."

Ken Thomases ken at codeweavers.com
Mon Nov 2 14:37:45 CST 2015


This reverts commit 57c51710e0a4474872125cc54be7562ea8db6ccd.
---
 dlls/wined3d/context.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 8ab7111..eb11fcf 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -781,10 +781,9 @@ void context_surface_update(struct wined3d_context *context, const struct wined3
     }
 }
 
-static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
+static void context_restore_pixel_format(struct wined3d_context *ctx)
 {
     const struct wined3d_gl_info *gl_info = ctx->gl_info;
-    BOOL ret = FALSE;
 
     if (ctx->restore_pf && IsWindow(ctx->restore_pf_win))
     {
@@ -793,7 +792,7 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
             HDC dc = GetDC(ctx->restore_pf_win);
             if (dc)
             {
-                if (!(ret = GL_EXTCALL(wglSetPixelFormatWINE(dc, ctx->restore_pf))))
+                if (!GL_EXTCALL(wglSetPixelFormatWINE(dc, ctx->restore_pf)))
                 {
                     ERR("wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n",
                             ctx->restore_pf, ctx->restore_pf_win);
@@ -809,7 +808,6 @@ static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
 
     ctx->restore_pf = 0;
     ctx->restore_pf_win = NULL;
-    return ret;
 }
 
 static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, int format)
@@ -1164,8 +1162,7 @@ void context_release(struct wined3d_context *context)
 
     if (!--context->level)
     {
-        if (context_restore_pixel_format(context))
-            context->needs_set = 1;
+        context_restore_pixel_format(context);
         if (context->restore_ctx)
         {
             TRACE("Restoring GL context %p on device context %p.\n", context->restore_ctx, context->restore_dc);
-- 
2.6.0




More information about the wine-patches mailing list