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