From ffb357b717680b52917f280b3716da7b387f4af2 Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Sun, 23 Mar 2014 22:45:54 -0500
Subject: [PATCH] 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 f90557e1003..3341ae2595a 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;
     }
 }