Fixes almost all the logging options which were previously broken

This commit is contained in:
Jasmine Iwanek
2022-10-27 11:20:31 -04:00
parent bff5026b8b
commit fab1632cee
63 changed files with 183 additions and 129 deletions

View File

@@ -495,10 +495,6 @@ es1371_read_frame_reg(es1371_t *dev, int frame, int page)
break;
}
if (page == 0x0e || page == 0x0f) {
audiopci_log("Read frame = %02x, page = %02x, uart fifo valid = %02x, temp = %03x\n", frame, page, dev->valid, ret);
}
return ret;
}

View File

@@ -37,11 +37,13 @@
* Copyright 2016-2020 Miran Grca.
* Copyright 2013-2018 Alexey Khokholov (Nuke.YKT)
*/
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define HAVE_STDARG_H
#include <86box/86box.h>
#include <86box/snd_opl_nuked.h>
#include <86box/sound.h>
@@ -208,14 +210,18 @@ enum {
};
#ifdef ENABLE_OPL_LOG
int nuked_do_log = ENABLE_OPL_LOG;
static void
nuked_log(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
if (nuked_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
# define nuked_log(fmt, ...)

View File

@@ -13,7 +13,7 @@
*
* Copyright 2022 Adrien Moulin.
*/
#include <cstdarg>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
@@ -21,6 +21,7 @@
#include "ymfm/ymfm_opl.h"
extern "C" {
#define HAVE_STDARG_H
#include <86box/86box.h>
#include <86box/timer.h>
#include <86box/device.h>
@@ -225,15 +226,18 @@ extern "C" {
#include <86box/snd_opl.h>
#ifdef ENABLE_OPL_LOG
int ymfm_do_log = ENABLE_OPL_LOG;
static void
ymfm_log(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
if (ymfm_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
# define ymfm_log(fmt, ...)