patch-src_FileClasses_music_ADLPlayer_cpp 864 B

12345678910111213141516171819202122232425
  1. $OpenBSD: patch-src_FileClasses_music_ADLPlayer_cpp,v 1.1.1.1 2014/05/29 08:31:26 kirby Exp $
  2. Fix a sound-related crash.
  3. From upstream: 5f744345ad903517ba06259c2e5a2e38aa7ec6f4
  4. --- src/FileClasses/music/ADLPlayer.cpp.orig Mon Feb 25 22:43:50 2013
  5. +++ src/FileClasses/music/ADLPlayer.cpp Mon May 26 08:52:44 2014
  6. @@ -196,6 +196,7 @@ void ADLPlayer::changeMusic(MUSICTYPE musicType)
  7. printf("Unable to load %s!\n",filename.c_str());
  8. } else {
  9. pSoundAdlibPC = new SoundAdlibPC(rwop);
  10. + pSoundAdlibPC->setVolume(musicVolume);
  11. SDL_RWclose(rwop);
  12. @@ -243,5 +244,7 @@ void ADLPlayer::toggleSound()
  13. void ADLPlayer::setMusicVolume(int newVolume) {
  14. MusicPlayer::setMusicVolume(newVolume);
  15. - pSoundAdlibPC->setVolume(newVolume);
  16. + if(musicOn) {
  17. + pSoundAdlibPC->setVolume(newVolume);
  18. + }
  19. }