aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk')
-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();