(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
use in debug.h. grfmsg() is now used as a specific debug-function for grf.
This commit is contained in:
@@ -92,7 +92,7 @@ static void CreateWindowsConsoleThread(void)
|
||||
_hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CheckForConsoleInput, NULL, 0, &dwThreadId);
|
||||
if (_hThread == NULL) error("Cannot create console thread!");
|
||||
|
||||
DEBUG(driver, 1) ("Windows console thread started...");
|
||||
DEBUG(driver, 2, "Windows console thread started");
|
||||
}
|
||||
|
||||
static void CloseWindowsConsoleThread(void)
|
||||
@@ -100,7 +100,7 @@ static void CloseWindowsConsoleThread(void)
|
||||
CloseHandle(_hThread);
|
||||
CloseHandle(_hInputReady);
|
||||
CloseHandle(_hWaitForInputHandling);
|
||||
DEBUG(driver, 1) ("Windows console thread shut down...");
|
||||
DEBUG(driver, 2, "Windows console thread shut down");
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -133,7 +133,7 @@ static const char *DedicatedVideoStart(const char * const *parm)
|
||||
OS2_SwitchToConsoleMode();
|
||||
#endif
|
||||
|
||||
DEBUG(driver, 1)("Loading dedicated server...");
|
||||
DEBUG(driver, 1, "Loading dedicated server");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ static void DedicatedVideoMainLoop(void)
|
||||
* intro game... */
|
||||
if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL)) {
|
||||
/* Loading failed, pop out.. */
|
||||
DEBUG(net, 0)("Loading requested map failed. Aborting.");
|
||||
DEBUG(net, 0, "Loading requested map failed, aborting");
|
||||
_networking = false;
|
||||
} else {
|
||||
/* We can load this game, so go ahead */
|
||||
@@ -264,7 +264,7 @@ static void DedicatedVideoMainLoop(void)
|
||||
// Done loading, start game!
|
||||
|
||||
if (!_networking) {
|
||||
DEBUG(net, 1)("Dedicated server could not be launched. Aborting.");
|
||||
DEBUG(net, 0, "Dedicated server could not be started, aborting");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ static bool CreateMainSurface(int w, int h)
|
||||
|
||||
GetAvailableVideoMode(&w, &h);
|
||||
|
||||
DEBUG(driver, 1) ("sdl: using mode %dx%d", w, h);
|
||||
DEBUG(driver, 1, "SDL: using mode %dx%d", w, h);
|
||||
|
||||
/* Give the application an icon */
|
||||
icon = SDL_CALL SDL_LoadBMP(ICON_DIR PATHSEP "openttd.32.bmp");
|
||||
@@ -295,8 +295,8 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
|
||||
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
|
||||
// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
|
||||
#if 0
|
||||
DEBUG(driver, 0) ("scancode character pressed %u", sym->scancode);
|
||||
DEBUG(driver, 0) ("unicode character pressed %u", sym->unicode);
|
||||
DEBUG(driver, 0, "Scancode character pressed %u", sym->scancode);
|
||||
DEBUG(driver, 0, "Unicode character pressed %u", sym->unicode);
|
||||
#endif
|
||||
return (key << 16) + sym->unicode;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ static const char *SdlVideoStart(const char * const *parm)
|
||||
if (s != NULL) return s;
|
||||
|
||||
SDL_CALL SDL_VideoDriverName(buf, 30);
|
||||
DEBUG(driver, 1) ("sdl: using driver '%s'", buf);
|
||||
DEBUG(driver, 1, "SDL: using driver '%s'", buf);
|
||||
|
||||
GetVideoModes();
|
||||
CreateMainSurface(_cur_resolution[0], _cur_resolution[1]);
|
||||
|
||||
Reference in New Issue
Block a user