aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2012-04-29 20:43:04 +0300
committerFilippos Karapetis2012-04-29 20:45:16 +0300
commite41e412c9ee6c277233ef9f7a5304f8cc40fa370 (patch)
tree3e770122684770ef243f087f9e0e7869451787e6 /engines/sci/engine
parent24e57808aa946ad38379b43ca205af6ef151c66a (diff)
downloadscummvm-rg350-e41e412c9ee6c277233ef9f7a5304f8cc40fa370.tar.gz
scummvm-rg350-e41e412c9ee6c277233ef9f7a5304f8cc40fa370.tar.bz2
scummvm-rg350-e41e412c9ee6c277233ef9f7a5304f8cc40fa370.zip
SCI: Fix for bug #3522046 "Detection of SQ4CD as Windows breaks Music"
Fall back to the DOS soundtracks in Windows CD versions if the user picks a non-General MIDI music device, as the Windows tracks only contain MIDI music
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/features.cpp3
-rw-r--r--engines/sci/engine/features.h7
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index cad95b1c18..8a932232f8 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -45,6 +45,7 @@ GameFeatures::GameFeatures(SegManager *segMan, Kernel *kernel) : _segMan(segMan)
_usesCdTrack = Common::File::exists("cdaudio.map");
if (!ConfMan.getBool("use_cdaudio"))
_usesCdTrack = false;
+ _forceDOSTracks = false;
}
reg_t GameFeatures::getDetectionAddr(const Common::String &objName, Selector slc, int methodNum) {
@@ -642,7 +643,7 @@ MoveCountType GameFeatures::detectMoveCountType() {
}
bool GameFeatures::useAltWinGMSound() {
- if (g_sci && g_sci->getPlatform() == Common::kPlatformWindows && g_sci->isCD()) {
+ if (g_sci && g_sci->getPlatform() == Common::kPlatformWindows && g_sci->isCD() && !_forceDOSTracks) {
SciGameId id = g_sci->getGameId();
return (id == GID_ECOQUEST ||
id == GID_JONES ||
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 4592c5be9c..f6bb0b5759 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -117,6 +117,12 @@ public:
*/
bool useAltWinGMSound();
+ /**
+ * Forces DOS soundtracks in Windows CD versions when the user hasn't
+ * selected a MIDI output device
+ */
+ void forceDOSTracks() { _forceDOSTracks = true; }
+
private:
reg_t getDetectionAddr(const Common::String &objName, Selector slc, int methodNum = -1);
@@ -137,6 +143,7 @@ private:
MoveCountType _moveCountType;
bool _usesCdTrack;
+ bool _forceDOSTracks;
SegManager *_segMan;
Kernel *_kernel;