aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-12-20 06:24:33 -0800
committerChris Robinson <[email protected]>2014-12-20 06:24:55 -0800
commitaa4cf99e635c3b2547339cdb82778a8aebd7a720 (patch)
tree409d281a5ef33ea05876b2f4b144402ed1e11913
parentabf0bd13caad070a614b987411f0754361ee9cfc (diff)
Fix logging on Windows
-rw-r--r--Alc/helpers.c4
-rw-r--r--OpenAL32/Include/alMain.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 8811f3c3..aa8feebc 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -438,10 +438,10 @@ void al_print(const char *type, const char *func, const char *fmt, ...)
str[sizeof(str)-1] = 0;
wstr = FromUTF8(str);
if(!wstr)
- fputs(str, LogFile);
+ fprintf(LogFile, "AL lib: %s %s: <UTF-8 error> %s", type, func, str);
else
{
- fwprintf(LogFile, L"AL lib: %s %s: %ls", type, func, wstr);
+ fprintf(LogFile, "AL lib: %s %s: %ls", type, func, wstr);
free(wstr);
wstr = NULL;
}
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index a3e40e8b..54bbc565 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -884,7 +884,7 @@ inline ALint GetChannelIdxByName(const ALCdevice *device, enum Channel chan)
extern FILE *LogFile;
-#if defined(__GNUC__) && !defined(IN_IDE_PARSER)
+#if defined(__GNUC__) && !defined(_WIN32) && !defined(IN_IDE_PARSER)
#define AL_PRINT(T, MSG, ...) fprintf(LogFile, "AL lib: %s %s: "MSG, T, __FUNCTION__ , ## __VA_ARGS__)
#else
void al_print(const char *type, const char *func, const char *fmt, ...) DECL_FORMAT(printf, 3,4);