From 5821529859b84d9ba264bf8b0b9267c900ed4103 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 27 Jul 2005 19:57:12 +0000 Subject: (svn r2728) -Fix/Feature: Change the driver probing algorithm Instead of trying to start a single driver and bailing out if that fails, try to initialise one by one and use the first one which succeeds. This should fix problems on machines with no sound card, where -s null had to be specified manually. --- video/dedicated_v.c | 6 +++--- video/sdl_v.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'video') diff --git a/video/dedicated_v.c b/video/dedicated_v.c index e0408c9bf..e15922e0c 100644 --- a/video/dedicated_v.c +++ b/video/dedicated_v.c @@ -86,14 +86,14 @@ static void CreateWindowsConsoleThread(void) if (hThread == NULL) error("Cannot create console thread!"); - DEBUG(misc, 0) ("Windows console thread started..."); + DEBUG(driver, 1) ("Windows console thread started..."); } static void CloseWindowsConsoleThread(void) { CloseHandle(hThread); CloseHandle(hEvent); - DEBUG(misc, 0) ("Windows console thread shut down..."); + DEBUG(driver, 1) ("Windows console thread shut down..."); } #endif @@ -126,7 +126,7 @@ static const char *DedicatedVideoStart(const char * const *parm) OS2_SwitchToConsoleMode(); #endif - DEBUG(misc,0)("Loading dedicated server..."); + DEBUG(driver, 1)("Loading dedicated server..."); return NULL; } diff --git a/video/sdl_v.c b/video/sdl_v.c index 4e7b36ab1..2c7aa8ad7 100644 --- a/video/sdl_v.c +++ b/video/sdl_v.c @@ -169,7 +169,7 @@ static bool CreateMainSurface(int w, int h) GetAvailableVideoMode(&w, &h); - DEBUG(misc, 1) ("sdl: using mode %dx%d", w, h); + DEBUG(driver, 1) ("sdl: using mode %dx%d", w, h); // DO NOT CHANGE TO HWSURFACE, IT DOES NOT WORK newscreen = SDL_CALL SDL_SetVideoMode(w, h, 8, SDL_SWSURFACE | SDL_HWPALETTE | (_fullscreen ? SDL_FULLSCREEN : SDL_RESIZABLE)); @@ -385,7 +385,7 @@ static const char *SdlVideoStart(const char * const *parm) if (s != NULL) return s; SDL_CALL SDL_VideoDriverName(buf, 30); - DEBUG(misc, 1) ("sdl: using driver '%s'", buf); + DEBUG(driver, 1) ("sdl: using driver '%s'", buf); GetVideoModes(); CreateMainSurface(_cur_resolution[0], _cur_resolution[1]); -- cgit v1.2.3-70-g09d2