aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-22 19:42:30 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit324a90f4f6e64ec4b92e2b746df5d4a75893044b (patch)
tree774cfbc19875503ca06f93fff7803fd16b512aef /base
parent33549d9c0225a1ecfc5924b5584cdcee466498cc (diff)
downloadscummvm-rg350-324a90f4f6e64ec4b92e2b746df5d4a75893044b.tar.gz
scummvm-rg350-324a90f4f6e64ec4b92e2b746df5d4a75893044b.tar.bz2
scummvm-rg350-324a90f4f6e64ec4b92e2b746df5d4a75893044b.zip
TTS: Implement tts state switching when needed.
The state has to be pushed and poped when there is a transition between game and gui code.
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 656a24b94b..ccd213eb31 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -558,9 +558,17 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
break;
}
#endif
+#ifdef USE_TTS
+ Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
+ ttsMan->pushState();
+#endif
// Try to run the game
Common::Error result = runGame(plugin, system, specialDebug);
+#ifdef USE_TTS
+ ttsMan->popState();
+#endif
+
#ifdef ENABLE_EVENTRECORDER
// Flush Event recorder file. The recorder does not get reinitialized for next game
// which is intentional. Only single game per session is allowed.