the_Foundation [main]
Windows: Print debug messages using Win32 API
cfd20c8030d4b849a6fa9421365d600d6816202c
[1mdiff --git a/src/the_foundation.c b/src/the_foundation.c[m
[1mindex e50ae24..f4c8897 100644[m
[1m--- a/src/the_foundation.c[m
[1m+++ b/src/the_foundation.c[m
[36m@@ -36,10 +36,13 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</small>[m
#include <locale.h>[m
[m
#if defined (iPlatformAndroid)[m
[31m-# include <android/log.h>[m
[32m+[m[32m# include <android/log.h>[m
#endif[m
[m
#if defined (iPlatformWindows)[m
[32m+[m[32m# define WIN32_LEAN_AND_MEAN[m
[32m+[m[32m# include <Windows.h>[m
[32m+[m[32m# include "platform/win32/wide.h"[m
void init_Windows_(void);[m
void deinit_Windows_(void);[m
#endif[m
[36m@@ -107,6 +110,15 @@[m [mvoid printMessage_Foundation(FILE *output, const char *format, ...) {[m
vprintf_Block(&msg, format, args);[m
va_end(args);[m
__android_log_print(ANDROID_LOG_DEBUG, "tfdn", "%s", cstr_Block(&msg));[m
[32m+[m[32m#elif defined (iPlatformWindows)[m
[32m+[m[32m iUnused(output);[m
[32m+[m[32m iBlock msg;[m
[32m+[m[32m init_Block(&msg, 0);[m
[32m+[m[32m va_list args;[m
[32m+[m[32m va_start(args, format);[m
[32m+[m[32m vprintf_Block(&msg, format, args);[m
[32m+[m[32m va_end(args);[m
[32m+[m[32m OutputDebugStringW(toWide_CStr_(cstr_Block(&msg)));[m
#else[m
va_list args;[m
va_start(args, format);[m