forked from Mirrors/openclonk
Finish the update from SDL_Mixer to SDL2_Mixer
parent
408dfff96e
commit
32d8d0db76
|
@ -113,11 +113,11 @@ if(Audio_TK STREQUAL "OpenAL")
|
||||||
set(Audio_INCLUDE_DIRS ${Audio_INCLUDE_DIRS} ${Alut_INCLUDE_DIRS})
|
set(Audio_INCLUDE_DIRS ${Audio_INCLUDE_DIRS} ${Alut_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
elseif(Audio_TK STREQUAL "SDL_Mixer")
|
elseif(Audio_TK STREQUAL "SDL_Mixer")
|
||||||
__FINDAUDIO_FINDSDLMIXER()
|
find_package(SDL2Mixer)
|
||||||
if(SDLMixer_FOUND)
|
if(SDL2Mixer_FOUND)
|
||||||
set(Audio_FOUND TRUE)
|
set(Audio_FOUND TRUE)
|
||||||
set(Audio_LIBRARIES ${SDLMixer_LIBRARIES})
|
set(Audio_LIBRARIES ${SDL2Mixer_LIBRARIES})
|
||||||
set(Audio_INCLUDE_DIRS ${SDLMixer_INCLUDE_DIRS})
|
set(Audio_INCLUDE_DIRS ${SDL2Mixer_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
elseif(Audio_TK STREQUAL "none")
|
elseif(Audio_TK STREQUAL "none")
|
||||||
set(Audio_FOUND TRUE)
|
set(Audio_FOUND TRUE)
|
||||||
|
|
|
@ -122,7 +122,7 @@ bool C4MusicFileSDL::Play(bool loop, double max_resume_time)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Mix_FreeMusic frees the RWop
|
// Mix_FreeMusic frees the RWop
|
||||||
Music = Mix_LoadMUS_RW(SDL_RWFromConstMem(Data, filesize));
|
Music = Mix_LoadMUS_RW(SDL_RWFromConstMem(Data, filesize), 1);
|
||||||
if (!Music)
|
if (!Music)
|
||||||
{
|
{
|
||||||
LogF("SDL_mixer: %s", SDL_GetError());
|
LogF("SDL_mixer: %s", SDL_GetError());
|
||||||
|
|
Loading…
Reference in New Issue