COMMON: removed USE_TTS check from engines
OSystem now just returns a nullptr if there is no text to speech manager instance (because none is compiled into the binary, or the system doesn't provide support for it). This removed the need for the engine authors to add scummvm osystem compile time options checks into their engine code
This commit is contained in:
parent
e0c1ea0584
commit
9d82fa51df
24 changed files with 10 additions and 122 deletions
|
@ -66,9 +66,7 @@
|
|||
#include "graphics/pixelformat.h"
|
||||
#include "image/bmp.h"
|
||||
|
||||
#ifdef USE_TTS
|
||||
#include "common/text-to-speech.h"
|
||||
#endif
|
||||
|
||||
// FIXME: HACK for error()
|
||||
Engine *g_engine = 0;
|
||||
|
@ -601,13 +599,11 @@ void Engine::pauseEngineIntern(bool pause) {
|
|||
void Engine::openMainMenuDialog() {
|
||||
if (!_mainMenuDialog)
|
||||
_mainMenuDialog = new MainMenuDialog(this);
|
||||
#ifdef USE_TTS
|
||||
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
|
||||
if (ttsMan != nullptr) {
|
||||
ttsMan->pushState();
|
||||
g_gui.initTextToSpeech();
|
||||
}
|
||||
#endif
|
||||
|
||||
setGameToLoadSlot(-1);
|
||||
|
||||
|
@ -635,10 +631,8 @@ void Engine::openMainMenuDialog() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef USE_TTS
|
||||
if (ttsMan != nullptr)
|
||||
ttsMan->popState();
|
||||
#endif
|
||||
|
||||
g_system->applyBackendSettings();
|
||||
applyGameSettings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue