gdi32: Avoid a not necessary CreateDC call

Dmitry Timoshkov dmitry at codeweavers.com
Thu Feb 22 04:43:13 CST 2007


Hello,

Changelog:
    gdi32: Avoid a not necessary CreateDC call.

---
 dlls/gdi32/wing.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi32/wing.c b/dlls/gdi32/wing.c
index 7550fe2..b821ad3 100644
--- a/dlls/gdi32/wing.c
+++ b/dlls/gdi32/wing.c
@@ -96,13 +96,11 @@ HDC16 WINAPI WinGCreateDC16(void)
  */
 BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *bmpi)
 {
-    static const WCHAR szDisplayW[] = { 'D','I','S','P','L','A','Y','\0' };
-    HDC hdc;
     TRACE("(%p)\n", bmpi);
+
     if (!bmpi)
 	return FALSE;
 
-    hdc = CreateDCW( szDisplayW, NULL, NULL, NULL );
     bmpi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
     bmpi->bmiHeader.biWidth = 320;
     bmpi->bmiHeader.biHeight = -1;
@@ -114,7 +112,7 @@ BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *bmpi)
     bmpi->bmiHeader.biYPelsPerMeter = 0;
     bmpi->bmiHeader.biClrUsed = 0;
     bmpi->bmiHeader.biClrImportant = 0;
-    DeleteDC(hdc);
+
     return TRUE;
 }
 
-- 
1.5.0






More information about the wine-patches mailing list