[Scummvm-git-logs] scummvm master -> b99925afb18fb939934db230805810730f07c65f
sluicebox
noreply at scummvm.org
Fri Dec 6 09:16:54 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b99925afb1 SCI32: Update GK1 CD speech repair config check
Commit: b99925afb18fb939934db230805810730f07c65f
https://github.com/scummvm/scummvm/commit/b99925afb18fb939934db230805810730f07c65f
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-12-06T01:16:21-08:00
Commit Message:
SCI32: Update GK1 CD speech repair config check
Ensures this option is only applied to the intended detection entries
Changed paths:
engines/sci/engine/features.cpp
engines/sci/engine/features.h
engines/sci/sound/decoders/sol.cpp
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 90b7e8a04fb..68f2dd9ec02 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -27,6 +27,7 @@
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/gui_options.h"
namespace Sci {
@@ -46,6 +47,8 @@ GameFeatures::GameFeatures(SegManager *segMan, Kernel *kernel) : _segMan(segMan)
_forceDOSTracks = false;
_useWindowsCursors = ConfMan.getBool("windows_cursors");
_pseudoMouseAbility = kPseudoMouseAbilityUninitialized;
+ _useAudioPopfix = Common::checkGameGUIOption(GAMEOPTION_GK1_ENABLE_AUDIO_POPFIX, ConfMan.get("guioptions")) &&
+ ConfMan.getBool("audio_popfix_enabled");
}
reg_t GameFeatures::getDetectionAddr(const Common::String &objName, Selector slc, int methodNum) {
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 730117817ce..3bc976d118f 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -272,6 +272,8 @@ public:
*/
PseudoMouseAbilityType detectPseudoMouseAbility();
+ bool useAudioPopfix() const { return _useAudioPopfix; }
+
bool useEarlyGetLongestTextCalculations() const;
/**
@@ -327,6 +329,8 @@ private:
PseudoMouseAbilityType _pseudoMouseAbility;
+ bool _useAudioPopfix;
+
SegManager *_segMan;
Kernel *_kernel;
};
diff --git a/engines/sci/sound/decoders/sol.cpp b/engines/sci/sound/decoders/sol.cpp
index 1dfd5b4c2f6..a02f199fc06 100644
--- a/engines/sci/sound/decoders/sol.cpp
+++ b/engines/sci/sound/decoders/sol.cpp
@@ -24,8 +24,8 @@
#include "audio/decoders/raw.h"
#include "common/substream.h"
#include "common/util.h"
-#include "common/config-manager.h"
#include "sci/sci.h"
+#include "sci/engine/features.h"
#include "sci/sound/decoders/sol.h"
#include "sci/resource/resource.h"
@@ -252,7 +252,7 @@ SOLStream<STEREO, S16BIT, OLDDPCM8>::SOLStream(Common::SeekableReadStream *strea
// SSCI aligns the size of SOL data to 32 bits
_rawDataSize(rawDataSize & ~3),
// The pop fix is only verified with (relevant to?) "old" DPCM8, so we enforce that here.
- _popfixDPCM8(ConfMan.getBool("audio_popfix_enabled") && OLDDPCM8) {
+ _popfixDPCM8(g_sci->_features->useAudioPopfix() && OLDDPCM8) {
if (S16BIT) {
_dpcmCarry16.l = _dpcmCarry16.r = 0;
} else {
More information about the Scummvm-git-logs
mailing list