aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 15:32:39 -0700
committerPaul Gilbert2019-07-06 15:32:39 -0700
commit1c412d3da705dabd709614c409927ce8f6fbfe05 (patch)
tree68e73692a1eb08d1bf0f0ca99ff677a85fa8d135 /engines
parent2c39c903fcd759de50e23de06b3388989e6f92a9 (diff)
downloadscummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.tar.gz
scummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.tar.bz2
scummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.zip
GLK: Properly handle sound setup
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/detection.cpp6
-rw-r--r--engines/glk/glk.cpp10
-rw-r--r--engines/glk/glk.h5
3 files changed, 18 insertions, 3 deletions
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index 7c6de28456..b19ecde62d 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -58,20 +58,20 @@ namespace Glk {
GlkDetectedGame::GlkDetectedGame(const char *gameId, const char *gameDesc, const Common::String &filename) :
DetectedGame(gameId, gameDesc, Common::EN_ANY, Common::kPlatformUnknown) {
- setGUIOptions(GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
+ setGUIOptions(GUIO3(GUIO_NOSPEECH, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
addExtraEntry("filename", filename);
}
GlkDetectedGame::GlkDetectedGame(const char *gameId, const char *gameDesc, const Common::String &filename,
Common::Language lang) : DetectedGame(gameId, gameDesc, lang, Common::kPlatformUnknown) {
- setGUIOptions(GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
+ setGUIOptions(GUIO3(GUIO_NOSPEECH, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
addExtraEntry("filename", filename);
}
GlkDetectedGame::GlkDetectedGame(const char *gameId, const char *gameDesc, const Common::String &filename,
const Common::String &md5, size_t filesize) :
DetectedGame(gameId, gameDesc, Common::UNK_LANG, Common::kPlatformUnknown) {
- setGUIOptions(GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
+ setGUIOptions(GUIO3(GUIO_NOSPEECH, GUIO_NOMUSIC, GUIO_NOSUBTITLES));
addExtraEntry("filename", filename);
canBeAdded = true;
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp
index b17304d957..06ab742e74 100644
--- a/engines/glk/glk.cpp
+++ b/engines/glk/glk.cpp
@@ -89,6 +89,9 @@ void GlkEngine::initialize() {
_sounds = new Sounds();
_streams = new Streams();
_windows = new Windows(_screen);
+
+ // Setup mixer
+ syncSoundSettings();
}
Screen *GlkEngine::createScreen() {
@@ -248,6 +251,13 @@ Common::Error GlkEngine::saveGameState(int slot, const Common::String &desc) {
return errCode;
}
+void GlkEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ int volume = ConfMan.getBool("sfx_mute") ? 0 : CLIP(ConfMan.getInt("sfx_volume"), 0, 255);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, volume);
+}
+
void GlkEngine::beep() {
_pcSpeaker->speakerOn(50, 50);
}
diff --git a/engines/glk/glk.h b/engines/glk/glk.h
index 739f1774d9..cc3fc10c85 100644
--- a/engines/glk/glk.h
+++ b/engines/glk/glk.h
@@ -209,6 +209,11 @@ public:
virtual Common::Error writeGameData(Common::WriteStream *ws) = 0;
/**
+ * Updates sound settings
+ */
+ virtual void syncSoundSettings() override;
+
+ /**
* Generate a beep
*/
void beep();