From 299cdaab70cff2bbf7a709cb53d5f097c50f05fc Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sat, 15 Feb 2020 22:32:10 -0800 Subject: Updated to 2.1.1 --- 68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch (limited to '68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch') diff --git a/68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch b/68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch new file mode 100644 index 0000000..d7b15fe --- /dev/null +++ b/68758a879e0c8ecc0d40962516d4e808aa4e15e5.patch @@ -0,0 +1,51 @@ +commit 68758a879e0c8ecc0d40962516d4e808aa4e15e5 +Author: D G Turner +Date: Tue Dec 17 04:21:04 2019 +0000 + + AUDIO: Really Fix Compilation Against Fluidsynth v2.1+ + + The previous fix did not work as the forbidden exception had no effect + since scummsys.h and thus forbidden.h had already been included prior + to the fluidsynth header being included. This also meant that undefining + the exception define after the header would have had no effect anyway. + + This new solution was suggest by eriktorbjorn on bug #11278 and should + avoid the need to add an exception which would persist over the entire + source file. + +diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp +index 33a74a1524..f8c2412492 100644 +--- a/audio/softsynth/fluidsynth.cpp ++++ b/audio/softsynth/fluidsynth.cpp +@@ -20,10 +20,16 @@ + * + */ + +-#include "common/scummsys.h" ++#include "config.h" + + #ifdef USE_FLUIDSYNTH + ++// Fluidsynth v2.1+ uses printf in one of it's headers, ++// include/fluidsynth/log.h around line 82 so need to include this ++// prior scummsys.h inclusion and thus forbidden.h ++#include ++ ++#include "common/scummsys.h" + #include "common/config-manager.h" + #include "common/error.h" + #include "common/system.h" +@@ -35,13 +41,6 @@ + #include "backends/platform/ios7/ios7_common.h" + #endif + +-// Fluidsynth v2.1+ uses printf in one of it's headers, so this is +-// needed to allow compilation, as reported by eriktorbjorn on 20191215 +-// This is in include/fluidsynth/log.h around line 82 +-#define FORBIDDEN_SYMBOL_EXCEPTION_printf +-#include +-#undef FORBIDDEN_SYMBOL_EXCEPTION_printf +- + class MidiDriver_FluidSynth : public MidiDriver_Emulated { + private: + MidiChannel_MPU401 _midiChannels[16]; -- cgit v1.2.1