Use SDL for logging
This commit is contained in:
parent
4821cab724
commit
3488833c2e
13
src/debug.cc
13
src/debug.cc
|
@ -5,10 +5,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include <SDL.h>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "platform_compat.h"
|
#include "platform_compat.h"
|
||||||
|
@ -148,13 +145,7 @@ int debugPrint(const char* format, ...)
|
||||||
rc = gDebugPrintProc(string);
|
rc = gDebugPrintProc(string);
|
||||||
} else {
|
} else {
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
char string[260];
|
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, format, args);
|
||||||
vsprintf(string, format, args);
|
|
||||||
#ifdef _WIN32
|
|
||||||
OutputDebugStringA(string);
|
|
||||||
#else
|
|
||||||
printf("%s", string);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
rc = -1;
|
rc = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue