Commit 200eb1d3 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Trigger the display driver load for CreateCompatibleDC(0).

parent 7c3bb607
......@@ -739,7 +739,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
{
DC *dc, *origDC;
HDC ret;
const struct gdi_dc_funcs *funcs = &null_driver;
const struct gdi_dc_funcs *funcs;
PHYSDEV physDev = NULL;
GDI_CheckNotLock();
......@@ -751,6 +751,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
funcs = physDev->funcs;
release_dc_ptr( origDC );
}
else funcs = DRIVER_load_driver( displayW );
if (!(dc = alloc_dc_ptr( OBJ_MEMDC ))) return 0;
......@@ -765,7 +766,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
ret = dc->hSelf;
if (!funcs->pCreateCompatibleDC( physDev, &dc->physDev ))
if (funcs->pCreateCompatibleDC && !funcs->pCreateCompatibleDC( physDev, &dc->physDev ))
{
WARN("creation aborted by device\n");
free_dc_ptr( dc );
......
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