Changelog wine/dlls/user/user_main.c: load_driver wine/dlls/gdi/driver.c: load_display_driver Fall back to the ttydrv when the DIPLAY variable is not set -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- Index: wine/dlls/user/user_main.c =================================================================== RCS file: /home/wine/wine/dlls/user/user_main.c,v retrieving revision 1.50 diff -u -r1.50 user_main.c --- wine/dlls/user/user_main.c 3 Dec 2002 23:34:54 -0000 1.50 +++ wine/dlls/user/user_main.c 13 Apr 2003 18:39:06 -0000 @@ -58,7 +58,7 @@ /* load the graphics driver */ static BOOL load_driver(void) { - char buffer[MAX_PATH]; + char buffer[MAX_PATH], buffer1[MAX_PATH]; HKEY hkey; DWORD type, count; @@ -69,6 +69,12 @@ RegQueryValueExA( hkey, "GraphicsDriver", 0, &type, buffer, &count ); RegCloseKey( hkey ); } + + if (GetEnvironmentVariableA("DISPLAY",buffer1,MAX_PATH-1) == 0) + { + MESSAGE( "Falling back to ttydrv\n"); + strcpy( buffer, "ttydrv" ); /* default value */ + } if (!(graphics_driver = LoadLibraryA( buffer ))) { Index: wine/dlls/gdi/driver.c =================================================================== RCS file: /home/wine/wine/dlls/gdi/driver.c,v retrieving revision 1.21 diff -u -r1.21 driver.c --- wine/dlls/gdi/driver.c 1 Apr 2003 00:12:50 -0000 1.21 +++ wine/dlls/gdi/driver.c 13 Apr 2003 18:39:06 -0000 @@ -190,7 +190,7 @@ */ static struct graphics_driver *load_display_driver(void) { - char buffer[MAX_PATH]; + char buffer[MAX_PATH], buffer1[MAX_PATH]; HMODULE module; HKEY hkey; @@ -207,6 +207,12 @@ RegQueryValueExA( hkey, "GraphicsDriver", 0, &type, buffer, &count ); RegCloseKey( hkey ); } + + if (GetEnvironmentVariableA("DISPLAY",buffer1,MAX_PATH-1) == 0) + { + MESSAGE( "Falling back to ttydrv\n"); + strcpy( buffer, "ttydrv" ); /* default value */ + } if (!(module = LoadLibraryA( buffer ))) {