Fixed missing background sound in Gob1

This commit is contained in:
Antonin Carette 2024-08-29 16:41:44 +02:00 committed by Filippos Karapetis
parent 6ed7bd1263
commit 64538394ec
2 changed files with 4 additions and 6 deletions

View File

@ -55,9 +55,7 @@ Sound::Sound(GobEngine *vm) : _vm(vm) {
_cdrom = nullptr;
_bgatmos = nullptr;
_hasAdLib = (!_vm->_noMusic && _vm->hasAdLib());
_hasAdLibBg = _hasAdLib;
_hasAdLibBg = _hasAdLib = (!_vm->_noMusic && _vm->hasAdLib());
if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) {
_infogrames = new Infogrames(*_vm->_mixer);
@ -337,7 +335,7 @@ void Sound::adlibPlayTrack(const char *trackname) {
}
void Sound::adlibPlayBgMusic() {
if (!_hasAdLib || _hasAdLibBg)
if (!_hasAdLib || !_hasAdLibBg) // If one of those is disabled, then stop there
return;
createADLPlayer();

View File

@ -154,8 +154,8 @@ public:
private:
GobEngine *_vm;
bool _hasAdLib;
bool _hasAdLibBg;
bool _hasAdLib = false;
bool _hasAdLibBg = false;
SoundDesc _sounds[kSoundsCount];