gdi32: Avoid a not necessary CreateDC call.
This commit is contained in:
parent
826f89f5a7
commit
aa3fa9a5d9
|
@ -96,13 +96,11 @@ HDC16 WINAPI WinGCreateDC16(void)
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *bmpi)
|
BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *bmpi)
|
||||||
{
|
{
|
||||||
static const WCHAR szDisplayW[] = { 'D','I','S','P','L','A','Y','\0' };
|
|
||||||
HDC hdc;
|
|
||||||
TRACE("(%p)\n", bmpi);
|
TRACE("(%p)\n", bmpi);
|
||||||
|
|
||||||
if (!bmpi)
|
if (!bmpi)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
hdc = CreateDCW( szDisplayW, NULL, NULL, NULL );
|
|
||||||
bmpi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
bmpi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
bmpi->bmiHeader.biWidth = 320;
|
bmpi->bmiHeader.biWidth = 320;
|
||||||
bmpi->bmiHeader.biHeight = -1;
|
bmpi->bmiHeader.biHeight = -1;
|
||||||
|
@ -114,7 +112,7 @@ BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *bmpi)
|
||||||
bmpi->bmiHeader.biYPelsPerMeter = 0;
|
bmpi->bmiHeader.biYPelsPerMeter = 0;
|
||||||
bmpi->bmiHeader.biClrUsed = 0;
|
bmpi->bmiHeader.biClrUsed = 0;
|
||||||
bmpi->bmiHeader.biClrImportant = 0;
|
bmpi->bmiHeader.biClrImportant = 0;
|
||||||
DeleteDC(hdc);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue