From a56c58765191f17180f612d69a4c4bf8d3c13233 Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Wed, 6 Jan 2016 10:20:42 +0100 Subject: IOS: Fluidsynth path hack only for iOS 7 --- audio/softsynth/fluidsynth.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index b776c04738..4240958616 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -31,7 +31,7 @@ #include "audio/musicplugin.h" #include "audio/mpu401.h" #include "audio/softsynth/emumidi.h" -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_OFFICIAL_IOS7 #include #include #include "backends/platform/ios7/ios7_common.h" @@ -184,7 +184,10 @@ int MidiDriver_FluidSynth::open() { const char *soundfont = ConfMan.get("soundfont").c_str(); -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_OFFICIAL_IOS7 + // HACK: Due to the sandbox on non-jailbroken iOS devices, we need to deal with the chroot filesystem. + // All the path selected by the user are relative to the Document directory. So, we need to adjust + // the path to reflect that. Common::String soundfont_fullpath = iOS7_getDocumentsDir(); soundfont_fullpath += soundfont; _soundFont = fluid_synth_sfload(_synth, soundfont_fullpath.c_str(), 1); -- cgit v1.2.3