Commit aa3fa9a5 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: Avoid a not necessary CreateDC call.

parent 826f89f5
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment