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
sezero committed Aug 30, 2019
1 parent cced391 commit 44e75df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions dynamic_mod.c
Expand Up @@ -30,7 +30,7 @@ mikmod_loader mikmod = {
};

#ifdef MOD_DYNAMIC
int Mix_InitMOD()
int Mix_InitMOD(void)
{
if ( mikmod.loaded == 0 ) {
mikmod.handle = SDL_LoadObject(MOD_DYNAMIC);
Expand Down Expand Up @@ -97,7 +97,7 @@ int Mix_InitMOD()
(void (*)(void*))
SDL_LoadFunction(mikmod.handle, "MikMod_free");
if ( mikmod.MikMod_free == NULL ) {
/* libmikmod 3.1 and earlier doesn't have it */
/* libmikmod-3.2.0-beta2 and earlier doesn't have it. */
mikmod.MikMod_free = free;
}
mikmod.Player_Active =
Expand Down Expand Up @@ -235,7 +235,7 @@ void Mix_QuitMOD()
--mikmod.loaded;
}
#else
int Mix_InitMOD()
int Mix_InitMOD(void)
{
if ( mikmod.loaded == 0 ) {
mikmod.MikMod_Exit = MikMod_Exit;
Expand All @@ -246,8 +246,8 @@ int Mix_InitMOD()
mikmod.MikMod_RegisterDriver = MikMod_RegisterDriver;
mikmod.MikMod_errno = &MikMod_errno;
mikmod.MikMod_strerror = MikMod_strerror;
#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 All @@ -274,7 +274,7 @@ int Mix_InitMOD()

return 0;
}
void Mix_QuitMOD()
void Mix_QuitMOD(void)
{
if ( mikmod.loaded == 0 ) {
return;
Expand Down
4 changes: 2 additions & 2 deletions dynamic_mod.h
Expand Up @@ -66,5 +66,5 @@ extern mikmod_loader mikmod;

#endif /* MOD_MUSIC */

extern int Mix_InitMOD();
extern void Mix_QuitMOD();
extern int Mix_InitMOD(void);
extern void Mix_QuitMOD(void);

0 comments on commit 44e75df

Please sign in to comment.