TTS: Remove USE_PLATFORM_TTS defines

Use defined(USE_TTS) && defined(PLATFORM) instead
This commit is contained in:
Jaromir Wysoglad 2019-08-15 15:30:30 +02:00 committed by Filippos Karapetis
parent d49331132a
commit b97333d4b7
12 changed files with 29 additions and 34 deletions

View file

@ -166,6 +166,12 @@ MODULE_OBJS += \
plugins/posix/posix-provider.o \
saves/posix/posix-saves.o \
taskbar/unity/unity-taskbar.o
ifdef USE_TTS
MODULE_OBJS += \
text-to-speech/linux/linux-text-to-speech.o
endif
endif
ifdef MACOSX
@ -176,6 +182,12 @@ MODULE_OBJS += \
midi/coremidi.o \
updates/macosx/macosx-updates.o \
taskbar/macosx/macosx-taskbar.o
ifdef USE_TTS
MODULE_OBJS += \
text-to-speech/macosx/macosx-text-to-speech.o
endif
endif
ifdef WIN32
@ -189,6 +201,12 @@ MODULE_OBJS += \
saves/windows/windows-saves.o \
updates/win32/win32-updates.o \
taskbar/win32/win32-taskbar.o
ifdef USE_TTS
MODULE_OBJS += \
text-to-speech/windows/windows-text-to-speech.o
endif
endif
ifeq ($(BACKEND),android)
@ -344,18 +362,5 @@ MODULE_OBJS += \
saves/recorder/recorder-saves.o
endif
ifdef USE_LINUX_TTS
MODULE_OBJS += \
text-to-speech/linux/linux-text-to-speech.o
endif
ifdef USE_WINDOWS_TTS
MODULE_OBJS += \
text-to-speech/windows/windows-text-to-speech.o
endif
ifdef USE_MACOSX_TTS
MODULE_OBJS += \
text-to-speech/macosx/macosx-text-to-speech.o
endif
# Include common rules
include $(srcdir)/rules.mk

View file

@ -87,7 +87,7 @@ void OSystem_MacOSX::initBackend() {
_updateManager = new MacOSXUpdateManager();
#endif
#ifdef USE_MACOSX_TTS
#ifdef USE_TTS
// Initialize Text to Speech manager
_textToSpeechManager = new MacOSXTextToSpeechManager();
#endif

View file

@ -55,7 +55,7 @@
#include <spawn.h>
#endif
#ifdef USE_LINUX_TTS
#ifdef USE_TTS
#include "backends/text-to-speech/linux/linux-text-to-speech.h"
#endif
extern char **environ;
@ -83,7 +83,7 @@ void OSystem_POSIX::initBackend() {
if (_savefileManager == 0)
_savefileManager = new POSIXSaveFileManager();
#ifdef USE_LINUX_TTS
#ifdef USE_TTS
// Initialize Text to Speech manager
_textToSpeechManager = new LinuxTextToSpeechManager();
#endif

View file

@ -54,7 +54,7 @@
#include "common/ustr.h"
#include "common/encoding.h"
#ifdef USE_WINDOWS_TTS
#if defined(USE_TTS)
#include "backends/text-to-speech/windows/windows-text-to-speech.h"
#endif
@ -121,7 +121,7 @@ void OSystem_Win32::initBackend() {
#endif
// Initialize text to speech
#ifdef USE_WINDOWS_TTS
#ifdef USE_TTS
_textToSpeechManager = new WindowsTextToSpeechManager();
#endif

View file

@ -25,7 +25,7 @@
#include "backends/text-to-speech/linux/linux-text-to-speech.h"
#if defined(USE_LINUX_TTS)
#if defined(USE_TTS) && defined(POSIX)
#include <speech-dispatcher/libspeechd.h>
#include "backends/platform/sdl/sdl-sys.h"

View file

@ -25,7 +25,7 @@
#include "common/scummsys.h"
#if defined(USE_LINUX_TTS)
#if defined(USE_TTS) && defined(POSIX)
#include "common/text-to-speech.h"
#include "common/str.h"

View file

@ -25,7 +25,7 @@
#include "common/scummsys.h"
#if defined(USE_MACOSX_TTS)
#if defined(USE_TTS) && defined(MACOSX)
#include "common/text-to-speech.h"
#include "common/queue.h"

View file

@ -25,7 +25,7 @@
#include "backends/text-to-speech/macosx/macosx-text-to-speech.h"
#if defined(USE_MACOSX_TTS)
#if defined(USE_TTS) && defined(MACOSX)
#include "common/translation.h"
#include <AppKit/NSSpeechSynthesizer.h>
#include <Foundation/NSString.h>

View file

@ -25,7 +25,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if defined(USE_WINDOWS_TTS)
#if defined(USE_TTS) && defined(WIN32)
#include <basetyps.h>
#include <windows.h>
#include <Servprov.h>

View file

@ -25,7 +25,7 @@
#include "common/scummsys.h"
#if defined(USE_WINDOWS_TTS)
#if defined(USE_TTS) && defined(WIN32)
#include "common/text-to-speech.h"
#include "common/str.h"

9
configure vendored
View file

@ -167,9 +167,6 @@ _libunity=auto
_dialogs=auto
_iconv=auto
_tts=auto
_linux_tts=no
_windows_tts=no
_macosx_tts=no
# Default option behavior yes/no
_debug_build=auto
_release_build=auto
@ -5407,22 +5404,16 @@ else
linux*)
echo "linux"
_tts=yes
_linux_tts=yes
define_in_config_if_yes $_linux_tts 'USE_LINUX_TTS'
append_var LIBS '-lspeechd'
;;
mingw*)
echo "win32"
_tts=yes
_windows_tts=yes
define_in_config_if_yes $_windows_tts 'USE_WINDOWS_TTS'
append_var LIBS '-lsapi -lole32'
;;
darwin*)
echo "osx"
_tts=yes
_macosx_tts=yes
define_in_config_if_yes $_macosx_tts 'USE_MACOSX_TTS'
;;
*)
echo "no"

View file

@ -428,7 +428,6 @@ int main(int argc, char *argv[]) {
if (ttsEnabled) {
setup.libraries.push_back("sapi");
setup.defines.push_back("USE_WINDOWS_TTS");
}
setup.defines.push_back("SDL_BACKEND");