From 4b7bd6af4ece5feebaca4a4a1c7f373070c0f110 Mon Sep 17 00:00:00 2001 From: Couriersud Date: Mon, 3 Aug 2009 18:07:31 +0000 Subject: [PATCH] Fixed compiling SDL_fsaudio.c against fusionsound 1.0.0 --- src/audio/fusionsound/SDL_fsaudio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/audio/fusionsound/SDL_fsaudio.c b/src/audio/fusionsound/SDL_fsaudio.c index 32fc9dd9c..288defdce 100644 --- a/src/audio/fusionsound/SDL_fsaudio.c +++ b/src/audio/fusionsound/SDL_fsaudio.c @@ -34,6 +34,8 @@ #include "../SDL_audio_c.h" #include "SDL_fsaudio.h" +#include + //#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so" #ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @@ -43,6 +45,10 @@ #define SDL_NAME(X) X #endif +#if (FUSIONSOUND_MAJOR_VERSION == 1) && (FUSIONSOUND_MINOR_VERSION < 1) +typedef DFBResult DirectResult; +#endif + /* The tag name used by fusionsoundc audio */ #define SDL_FS_DRIVER_NAME "fusionsound" /* Buffers to use - more than 2 gives a lot of latency */ @@ -53,8 +59,8 @@ static const char *fs_library = SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC; static void *fs_handle = NULL; -static DirectResult(*SDL_NAME(FusionSoundInit)) (int *argc, char *(*argv[])); -static DirectResult(*SDL_NAME(FusionSoundCreate)) (IFusionSound ** +static DirectResult (*SDL_NAME(FusionSoundInit)) (int *argc, char *(*argv[])); +static DirectResult (*SDL_NAME(FusionSoundCreate)) (IFusionSound ** ret_interface); #define SDL_FS_SYM(x) { #x, (void **) (char *) &SDL_NAME(x) }