Ken Thomases : wined3d: Don't call GetPixelFormat() to set a flag that' s already set.

Alexandre Julliard julliard at winehq.org
Mon Mar 24 15:59:47 CDT 2014


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

Author: Ken Thomases <ken at codeweavers.com>
Date:   Sun Mar 23 22:45:54 2014 -0500

wined3d: Don't call GetPixelFormat() to set a flag that's already set.

---

 dlls/wined3d/context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index f90557e..3341ae2 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1116,7 +1116,7 @@ static void context_enter(struct wined3d_context *context)
             context->restore_dc = wglGetCurrentDC();
             context->needs_set = 1;
         }
-        else if (context->pixel_format != GetPixelFormat(context->hdc))
+        else if (!context->needs_set && context->pixel_format != GetPixelFormat(context->hdc))
             context->needs_set = 1;
     }
 }




More information about the wine-cvs mailing list