From 19c5f4e705be285994192b14d2420c0b747fd32c Mon Sep 17 00:00:00 2001 From: sezero Date: Mon, 20 Aug 2018 20:24:05 +0300 Subject: [PATCH] glide2x, cvg, oeminit.c: ifdef magic --- glide2x/cvg/glide/oem/oeminit.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/glide2x/cvg/glide/oem/oeminit.c b/glide2x/cvg/glide/oem/oeminit.c index 18b1d58..b57bb88 100644 --- a/glide2x/cvg/glide/oem/oeminit.c +++ b/glide2x/cvg/glide/oem/oeminit.c @@ -22,7 +22,7 @@ #include #include -#ifndef __linux__ +#ifdef _WIN32 #include #endif @@ -92,27 +92,30 @@ MyDebugPrintf(FILE* outputFile, const char* fmtString, ...) debugDumpP = ((envStr != NULL) && (atoi(envStr) >= 80)); - + calledP = FXTRUE; } if (debugDumpP) { va_list args; - + #if !DIRECTX va_start(args, fmtString); if (outputFile != NULL) vfprintf(outputFile, fmtString, args); va_end(args); #endif /* !DIRECTX */ - + va_start(args, fmtString); +#if __WIN32__ { - //char msgBuf[256]; - - vfprintf(stderr, fmtString, args); - //vsprintf(msgBuf, fmtString, args); - //OutputDebugString(msgBuf); + char msgBuf[256]; + + vsprintf(msgBuf, fmtString, args); + OutputDebugString(msgBuf); } +#else + vfprintf(stderr, fmtString, args); +#endif va_end(args); } } @@ -159,7 +162,7 @@ GlideRes2String(GrScreenResolution_t res) static const char* GlideRefresh2String(GrScreenRefresh_t refresh) -{ +{ static const char* refreshStrings[] = { "60", "70", "72", "75", "80", "90", "100", "85", "120" }; @@ -368,5 +371,3 @@ FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode) return 1; #undef FN_NAME } /* fxoemRestoreVideo */ - -