diff options
Diffstat (limited to 'games-strategy/scorched3d/files/scorched3d-40.1c-freealut.patch')
-rw-r--r-- | games-strategy/scorched3d/files/scorched3d-40.1c-freealut.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/games-strategy/scorched3d/files/scorched3d-40.1c-freealut.patch b/games-strategy/scorched3d/files/scorched3d-40.1c-freealut.patch new file mode 100644 index 000000000000..19be920baba8 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-40.1c-freealut.patch @@ -0,0 +1,70 @@ +--- configure ++++ configure +@@ -4010,6 +4010,7 @@ + + CFLAGS="$CFLAGS `$FREEALUT_CONFIG --cflags`" + CXXFLAGS="$CXXFLAGS `$FREEALUT_CONFIG --cflags`" ++ LIBS="$LIBS `$FREEALUT_CONFIG --libs`" + + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + +--- src/sound/SoundBufferStaticWav.cpp ++++ src/sound/SoundBufferStaticWav.cpp +@@ -57,44 +57,7 @@ + SoundBuffer(fileName), + buffer_(0) + { +- unsigned int error; +- +- // Create a buffer +- alGetError(); +- alGenBuffers(1, &buffer_); +- if ((error = alGetError()) != AL_NO_ERROR) +- { +- return; +- } +- +- // Load WAV +- void *data; +- ALenum format; +- ALsizei size; +- ALsizei freq; +- ALboolean loop; +- +-#ifdef __DARWIN__ +- alutLoadWAVFile((ALbyte*) fileName,&format,&data,&size,&freq); +-#else +- alutLoadWAVFile((ALbyte*) fileName,&format,&data,&size,&freq,&loop); +-#endif +- +- if ((error = alGetError()) != AL_NO_ERROR) +- { +- return; +- } +- +- // Load WAV into buffer +- alBufferData(buffer_,format,data,size,freq); +- if ((error = alGetError()) != AL_NO_ERROR) +- { +- return; +- } +- +- // Delete WAV memory +- alutUnloadWAV(format,data,size,freq); +- if ((error = alGetError()) != AL_NO_ERROR) ++ if ((buffer_ = alutCreateBufferFromFile(fileName)) == AL_NONE) + { + return; + } + +--- src/sound/Sound.cpp ++++ src/sound/Sound.cpp +@@ -152,6 +152,7 @@ + totalSources_.push_back(source); + availableSources_.push_back(source); + } ++ alutInitWithoutContext(NULL, NULL); + + init_ = true; + return init_; |