Skip to content

Commit

Permalink
mikmod loader: revised libmikmod-3.2.0-beta2 detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Aug 30, 2019
1 parent eee5e7d commit 61fd16e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/codecs/music_mikmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static mikmod_loader mikmod = {
mikmod.NAME = &NAME;
#endif

static int MIKMOD_Load()
static int MIKMOD_Load(void)
{
if (mikmod.loaded == 0) {
#ifdef MIKMOD_DYNAMIC
Expand Down Expand Up @@ -115,12 +115,12 @@ static int MIKMOD_Load()
#ifdef MIKMOD_DYNAMIC
mikmod.MikMod_free = (void (*)(void*)) SDL_LoadFunction(mikmod.handle, "MikMod_free");
if (!mikmod.MikMod_free) {
/* libmikmod 3.1 and earlier doesn't have it */
/* libmikmod-3.2.0-beta2 and earlier doesn't have it. */
mikmod.MikMod_free = free;
}
#else
#if (LIBMIKMOD_VERSION < 0x030200) || !defined(DMODE_NOISEREDUCTION)
/* libmikmod 3.2.0-beta2 or older */
#if (LIBMIKMOD_VERSION < 0x030200) || (LIBMIKMOD_VERSION == 0x030200 && !defined(DMODE_NOISEREDUCTION))
/* libmikmod 3.2.0-beta2 or earlier */
mikmod.MikMod_free = free;
#else
mikmod.MikMod_free = MikMod_free;
Expand Down Expand Up @@ -149,7 +149,7 @@ static int MIKMOD_Load()
return 0;
}

static void MIKMOD_Unload()
static void MIKMOD_Unload(void)
{
if (mikmod.loaded == 0) {
return;
Expand Down Expand Up @@ -361,6 +361,7 @@ void *MIKMOD_CreateFromRW(SDL_RWops *src, int freesrc)
if (freesrc) {
SDL_RWclose(src);
}

return music;
}

Expand Down

0 comments on commit 61fd16e

Please sign in to comment.