Commit 4b5f326e authored by Alexandre Julliard's avatar Alexandre Julliard

Default to an empty driver instead of dying if the specified display

driver couldn't be loaded.
parent 7a48f838
......@@ -889,6 +889,20 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
if ((dc = DC_GetDCPtr( hdc )))
{
if (dc->funcs->pGetDeviceCaps) ret = dc->funcs->pGetDeviceCaps( dc->physDev, cap );
else switch(cap) /* return meaningful values for some entries */
{
case HORZRES: ret = 640; break;
case VERTRES: ret = 480; break;
case BITSPIXEL: ret = 1; break;
case PLANES: ret = 1; break;
case NUMCOLORS: ret = 2; break;
case ASPECTX: ret = 36; break;
case ASPECTY: ret = 36; break;
case ASPECTXY: ret = 51; break;
case LOGPIXELSX: ret = 72; break;
case LOGPIXELSY: ret = 72; break;
case SIZEPALETTE: ret = 2; break;
}
GDI_ReleaseObj( hdc );
}
return ret;
......
......@@ -73,9 +73,9 @@ static struct graphics_driver *create_driver( HMODULE module )
driver->count = 1;
/* fill the function table */
if (module)
{
#define GET_FUNC(name) driver->funcs.p##name = (void*)GetProcAddress( module, #name )
GET_FUNC(AbortDoc);
GET_FUNC(AbortPath);
GET_FUNC(AlphaBlend);
......@@ -195,6 +195,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(SwapBuffers);
GET_FUNC(WidenPath);
#undef GET_FUNC
}
else memset( &driver->funcs, 0, sizeof(driver->funcs) );
/* add it to the list */
driver->prev = NULL;
......@@ -221,7 +223,7 @@ static struct graphics_driver *load_display_driver(void)
return display_driver;
}
strcpy( buffer, "x11,tty" ); /* default value */
strcpy( buffer, "x11" ); /* default value */
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Drivers", &hkey ))
{
......@@ -240,13 +242,6 @@ static struct graphics_driver *load_display_driver(void)
if ((module = LoadLibraryA( libname )) != 0) break;
name = next;
}
if (!module)
{
MESSAGE( "wine: Could not load graphics driver '%s'.\n", buffer );
if (!strcasecmp( buffer, "x11" ))
MESSAGE( "Make sure that your X server is running and that $DISPLAY is set correctly.\n" );
ExitProcess(1);
}
if (!(display_driver = create_driver( module )))
{
......
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