Skip to content

Commit e816710

Browse files
guiltSiegeLord
authored andcommitted
Fix Unicode/Non-Unicode path appearing on Output Console.
1 parent bd79095 commit e816710

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/debug.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include "allegro5/internal/aintern_thread.h"
2222
#include "allegro5/internal/aintern_vector.h"
2323

24+
#ifdef ALLEGRO_WINDOWS
25+
#include "allegro5/internal/aintern_wunicode.h"
26+
#endif
27+
2428
#ifdef ALLEGRO_ANDROID
2529
#include <unistd.h>
2630
#include <android/log.h>
@@ -329,7 +333,9 @@ void _al_trace_suffix(const char *msg, ...)
329333
}
330334
#endif
331335
#ifdef ALLEGRO_WINDOWS
332-
(void) OutputDebugString((LPCTSTR) static_trace_buffer);
336+
TCHAR *windows_output = _twin_utf8_to_tchar(static_trace_buffer);
337+
OutputDebugString(windows_output);
338+
al_free(windows_output);
333339
#endif
334340
static_trace_buffer[0] = '\0';
335341
}

0 commit comments

Comments
 (0)