gdi32: Make sure the DC is up-to-date before accessing the pixel format.
diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c
index f0810a8..022fc2c 100644
--- a/dlls/gdi32/opengl.c
+++ b/dlls/gdi32/opengl.c
@@ -253,6 +253,7 @@
if (!dc) return 0;
+ update_dc( dc );
if (!dc->funcs->pwglSetPixelFormatWINE) FIXME(" :stub\n");
else bRet = dc->funcs->pwglSetPixelFormatWINE(dc->physDev, iPixelFormat, ppfd);
diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c
index 8c9aa98..c3d8310 100644
--- a/dlls/gdi32/painting.c
+++ b/dlls/gdi32/painting.c
@@ -372,6 +372,7 @@
if (!dc) return 0;
+ update_dc( dc );
if (!dc->funcs->pSetPixelFormat) FIXME(" :stub\n");
else bRet = dc->funcs->pSetPixelFormat(dc->physDev,iPixelFormat,ppfd);
@@ -433,6 +434,7 @@
if (!dc) return 0;
+ update_dc( dc );
if (!dc->funcs->pDescribePixelFormat)
{
FIXME(" :stub\n");