Fix build with enabled DYNAMIC_LOAD
This commit is contained in:
parent
dcca04608c
commit
7d4e18b4a2
1 changed files with 12 additions and 12 deletions
|
@ -387,18 +387,6 @@ static Mix_Music *LoadMusic(const char *name)
|
|||
return currentMusic;
|
||||
}
|
||||
|
||||
static Mix_Chunk *LoadSample(const char *name)
|
||||
{
|
||||
#ifdef DYNAMIC_LOAD
|
||||
Mix_Chunk *r = (Mix_Chunk *)calloc(sizeof(Mix_Chunk), 1);
|
||||
r->allocated = 0xcafebeef;
|
||||
r->abuf = (Uint8 *)(strdup(name));
|
||||
return r;
|
||||
#else
|
||||
return ForceLoadSample(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
static Mix_Chunk *ForceLoadSample(const char *name)
|
||||
{
|
||||
Mix_Chunk *r = Mix_LoadWAV(name);
|
||||
|
@ -414,6 +402,18 @@ static Mix_Chunk *ForceLoadSample(const char *name)
|
|||
return Mix_LoadWAV_RW(f->as_SDL_RWops(), 1);
|
||||
}
|
||||
|
||||
static Mix_Chunk *LoadSample(const char *name)
|
||||
{
|
||||
#ifdef DYNAMIC_LOAD
|
||||
Mix_Chunk *r = (Mix_Chunk *)calloc(sizeof(Mix_Chunk), 1);
|
||||
r->allocated = 0xcafebeef;
|
||||
r->abuf = (Uint8 *)(strdup(name));
|
||||
return r;
|
||||
#else
|
||||
return ForceLoadSample(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
** Load a music file
|
||||
**
|
||||
|
|
Loading…
Reference in a new issue