Change to logging - when logging is disabled, the logging functions are now #define'd to nothing, so the compiler ignores the lines that call them completely, seems to slightly speed up the emulator; note that the logging in vid_table.c has not been changed yet, because this file on my local tree currently contains other WIP changes.
This commit is contained in:
12
src/mem.c
12
src/mem.c
@@ -154,22 +154,22 @@ static int port_92_reg = 0;
|
||||
|
||||
#ifdef ENABLE_MEM_LOG
|
||||
int mem_do_log = ENABLE_MEM_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
mem_log(const char *format, ...)
|
||||
mem_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_MEM_LOG
|
||||
va_list ap;
|
||||
|
||||
if (mem_do_log) {
|
||||
va_start(ap, format);
|
||||
pclog_ex(format, ap);
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define mem_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user