From 9f8f21f10a06a43320cabf4e6d1ebd8933dcb6cd Mon Sep 17 00:00:00 2001 From: sergm Date: Wed, 9 Nov 2016 20:09:24 +0200 Subject: [PATCH] mt32emu patch for DOSBox: - Improved implementation of MT32ReportHandler::printDebug() to be more efficient yet to avoid compiler warning "format not a string literal and no format arguments" --- DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff | 15 ++++----------- .../dosbox-SVN-r4000-mt32-patch.diff | 9 ++++----- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff b/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff index 9efe452..bfb975b 100644 --- a/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff +++ b/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff @@ -1,9 +1,3 @@ -commit f060df708f8395f61b2cf03f8679f61ee78a6a49 -Author: sergm -Date: Mon Dec 8 10:26:19 2014 +0200 - - mt32emu patch - diff --git a/src/Makefile.am b/src/Makefile.am index 184469e..286638d 100644 --- a/src/Makefile.am @@ -65,10 +59,10 @@ index 61d15e5..0ec8ebc 100644 Bitu cmd_len; diff --git a/src/gui/midi_mt32.cpp b/src/gui/midi_mt32.cpp new file mode 100644 -index 0000000..eb8bf8f +index 0000000..25a30d1 --- /dev/null +++ b/src/gui/midi_mt32.cpp -@@ -0,0 +1,265 @@ +@@ -0,0 +1,264 @@ +#include +#include +#include "control.h" @@ -329,9 +323,8 @@ index 0000000..eb8bf8f + MidiHandler_mt32 &midiHandler_mt32 = MidiHandler_mt32::GetInstance(); + if (midiHandler_mt32.noise) { + char s[1024]; -+ strcpy(s, "MT32: "); -+ vsnprintf(s + 6, 1017, fmt, list); -+ LOG_MSG(s); ++ vsnprintf(s, 1023, fmt, list); ++ LOG_MSG("MT32: %s", s); + } +} diff --git a/src/gui/midi_mt32.h b/src/gui/midi_mt32.h diff --git a/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff b/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff index 51bb24d..d196ab4 100644 --- a/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff +++ b/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff @@ -57,10 +57,10 @@ index 57181e0..3bc943b 100644 void MIDI_RawOutByte(Bit8u data) { diff --git a/src/gui/midi_mt32.cpp b/src/gui/midi_mt32.cpp new file mode 100644 -index 0000000..eb8bf8f +index 0000000..25a30d1 --- /dev/null +++ b/src/gui/midi_mt32.cpp -@@ -0,0 +1,265 @@ +@@ -0,0 +1,264 @@ +#include +#include +#include "control.h" @@ -321,9 +321,8 @@ index 0000000..eb8bf8f + MidiHandler_mt32 &midiHandler_mt32 = MidiHandler_mt32::GetInstance(); + if (midiHandler_mt32.noise) { + char s[1024]; -+ strcpy(s, "MT32: "); -+ vsnprintf(s + 6, 1017, fmt, list); -+ LOG_MSG(s); ++ vsnprintf(s, 1023, fmt, list); ++ LOG_MSG("MT32: %s", s); + } +} diff --git a/src/gui/midi_mt32.h b/src/gui/midi_mt32.h