Cleanups to make all logging functions use stdlog instead of stdout.
The new --logfile (-L) commandline option sets a file to log to. The new --debug (-D) forces output to stderr if no logfile is given.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
||||
#include "sound.h"
|
||||
#include "snd_emu8k.h"
|
||||
|
||||
|
||||
#if !defined FILTER_INITIAL && !defined FILTER_MOOG && !defined FILTER_CONSTANT
|
||||
//#define FILTER_INITIAL
|
||||
#define FILTER_MOOG
|
||||
@@ -295,20 +296,22 @@ uint32_t rep_count_w = 0;
|
||||
int emu8k_do_log = ENABLE_EMU8K_LOG;
|
||||
#endif
|
||||
|
||||
void emu8k_log(const char *format, ...)
|
||||
|
||||
static void
|
||||
emu8k_log(const char *format, ...)
|
||||
{
|
||||
#ifdef ENABLE_EMU8K_LOG
|
||||
if (emu8k_do_log)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
fflush(stdout);
|
||||
}
|
||||
if (emu8k_do_log) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vfprintf(stdlog, format, ap);
|
||||
va_end(ap);
|
||||
fflush(stdlog);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline int16_t EMU8K_READ(emu8k_t *emu8k, uint32_t addr)
|
||||
{
|
||||
const register emu8k_mem_pointers_t addrmem = {{addr}};
|
||||
|
||||
Reference in New Issue
Block a user