summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-27 19:57:12 +0000
committertron <tron@openttd.org>2005-07-27 19:57:12 +0000
commit5821529859b84d9ba264bf8b0b9267c900ed4103 (patch)
tree2d81a3e658bac637585e76cd5f1b80266f4b05b6 /video
parent6c52a8629d0b94d72e20809818cb0fd5c3097c93 (diff)
downloadopenttd-5821529859b84d9ba264bf8b0b9267c900ed4103.tar.xz
(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.
Diffstat (limited to 'video')
-rw-r--r--video/dedicated_v.c6
-rw-r--r--video/sdl_v.c4
2 files changed, 5 insertions, 5 deletions
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]);