Commit 9005a21f authored by Ian Pilcher's avatar Ian Pilcher Committed by Alexandre Julliard

Don't load the WINEPS driver until it's needed.

parent fbc3619c
......@@ -24,9 +24,6 @@ BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
/* Create the Win16 printer driver */
if (!WIN16DRV_Init()) return FALSE;
/* PSDRV initialization */
if (!LoadLibraryA( "wineps" )) return FALSE;
return TRUE;
}
......
......@@ -54,15 +54,23 @@ BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs )
*/
const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name )
{
GRAPHICS_DRIVER *driver = firstDriver;
GRAPHICS_DRIVER *driver;
HINSTANCE hDriver;
TRACE(": %s\n", name);
while (driver && name)
{
if (!name) return genericDriver ? genericDriver->funcs : NULL;
for (driver = firstDriver; driver; driver = driver->next)
if (!strcasecmp( driver->name, name )) return driver->funcs;
driver = driver->next;
}
return genericDriver ? genericDriver->funcs : NULL;
if (!(hDriver = LoadLibraryA (name))) return NULL;
for (driver = firstDriver; driver; driver = driver->next)
if (!strcasecmp( driver->name, name )) return driver->funcs;
FreeLibrary (hDriver);
return NULL;
}
......
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