From 3488833c2e0a1fdbf1be4945628c2c16912fe9f1 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 29 Oct 2022 20:57:11 +0300 Subject: [PATCH] Use SDL for logging --- src/debug.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/debug.cc b/src/debug.cc index fe17a60..6d03c8a 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -5,10 +5,7 @@ #include #include -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#endif +#include #include "memory.h" #include "platform_compat.h" @@ -148,13 +145,7 @@ int debugPrint(const char* format, ...) rc = gDebugPrintProc(string); } else { #ifdef _DEBUG - char string[260]; - vsprintf(string, format, args); -#ifdef _WIN32 - OutputDebugStringA(string); -#else - printf("%s", string); -#endif + SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, format, args); #endif rc = -1; }