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/serial.c
12
src/serial.c
@@ -30,22 +30,22 @@ int serial_do_log = 0;
|
||||
|
||||
#ifdef ENABLE_SERIAL_LOG
|
||||
int serial_do_log = ENABLE_SERIAL_LOG;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
serial_log(const char *format, ...)
|
||||
serial_log(const char *fmt, ...)
|
||||
{
|
||||
#ifdef ENABLE_SERIAL_LOG
|
||||
va_list ap;
|
||||
|
||||
if (serial_do_log) {
|
||||
va_start(ap, format);
|
||||
pclog_ex(format, ap);
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define serial_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
void serial_reset()
|
||||
|
||||
Reference in New Issue
Block a user