aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-18 22:57:48 -0700
committerChris Robinson <[email protected]>2019-06-18 22:57:48 -0700
commit0fa984027c37e6ae9f5acbfd013cba5ba90ea9aa (patch)
tree7c4980e9f8918fcec314402cfcf1b98b6492c8a5 /Alc/helpers.cpp
parent706df72d1813272e6cdfe817cf4c0adfefa13bd9 (diff)
Simplify al_print
Diffstat (limited to 'Alc/helpers.cpp')
-rw-r--r--Alc/helpers.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 9236e57a..3efa989d 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -477,7 +477,7 @@ void *GetSymbol(void *handle, const char *name)
}
-void al_print(const char *type, const char *fmt, ...)
+void al_print(FILE *logfile, const char *fmt, ...)
{
al::vector<char> dynmsg;
char stcmsg[256];
@@ -497,8 +497,8 @@ void al_print(const char *type, const char *fmt, ...)
va_end(args);
std::wstring wstr{utf8_to_wstr(str)};
- fprintf(gLogFile, "AL lib: %s %ls", type, wstr.c_str());
- fflush(gLogFile);
+ fprintf(logfile, "%ls", wstr.c_str());
+ fflush(logfile);
}
@@ -713,16 +713,15 @@ void *GetSymbol(void *handle, const char *name)
#endif /* HAVE_DLFCN_H */
-void al_print(const char *type, const char *fmt, ...)
+void al_print(FILE *logfile, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- fprintf(gLogFile, "AL lib: %s ", type);
- vfprintf(gLogFile, fmt, ap);
+ vfprintf(logfile, fmt, ap);
va_end(ap);
- fflush(gLogFile);
+ fflush(logfile);
}