Revert "GUI: honor tts_enabled option in some more places"

This reverts commit 5969a2667a85b81a8b78b75fdf6d2d5364068155.
This commit is contained in:
athrxx 2022-04-10 19:50:13 +02:00 committed by Filippos Karapetis
parent ff1957196d
commit 5cba8f9242
2 changed files with 4 additions and 5 deletions

View File

@ -619,13 +619,12 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
}
#endif
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
if (ttsMan != nullptr && ConfMan.hasKey("tts_enabled", "scummvm") && ConfMan.getBool("tts_enabled", "scummvm")) {
if (ttsMan != nullptr) {
ttsMan->pushState();
}
// Try to run the game
Common::Error result = runGame(plugin, enginePlugin, system, specialDebug);
if (ttsMan != nullptr && ConfMan.hasKey("tts_enabled", "scummvm") && ConfMan.getBool("tts_enabled", "scummvm")) {
if (ttsMan != nullptr) {
ttsMan->popState();
}

View File

@ -666,7 +666,7 @@ void Engine::openMainMenuDialog() {
if (!_mainMenuDialog)
_mainMenuDialog = new MainMenuDialog(this);
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
if (ttsMan != nullptr && ConfMan.hasKey("tts_enabled", "scummvm") && ConfMan.getBool("tts_enabled", "scummvm")) {
if (ttsMan != nullptr) {
ttsMan->pushState();
g_gui.initTextToSpeech();
}
@ -697,7 +697,7 @@ void Engine::openMainMenuDialog() {
}
}
if (ttsMan != nullptr && ConfMan.hasKey("tts_enabled", "scummvm") && ConfMan.getBool("tts_enabled", "scummvm"))
if (ttsMan != nullptr)
ttsMan->popState();
g_system->applyBackendSettings();