aboutsummaryrefslogtreecommitdiff
path: root/backends/text-to-speech
diff options
context:
space:
mode:
authorsluicebox2019-10-09 12:19:31 -0700
committerFilippos Karapetis2019-10-10 22:55:12 +0300
commit912bbf364c1c287f891291229d30226a5a71eed9 (patch)
tree19aab23318a982ff80636685f5d920d25b80ffdc /backends/text-to-speech
parentc1697cd177eee47dc413273ff9f50b93cfcd5f9f (diff)
downloadscummvm-rg350-912bbf364c1c287f891291229d30226a5a71eed9.tar.gz
scummvm-rg350-912bbf364c1c287f891291229d30226a5a71eed9.tar.bz2
scummvm-rg350-912bbf364c1c287f891291229d30226a5a71eed9.zip
TTS: Enable in Mingw-w64 builds
TTS libraries can now be used in default Mingw-w64 environments. - Removes reference to sapiddk.h which isn't used and isn't in Mingw-w64 - Defines guids whose symbols are missing from Mingw-w64 - Restores TTS detection to configure script
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r--backends/text-to-speech/windows/sphelper-scummvm.h5
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp11
2 files changed, 12 insertions, 4 deletions
diff --git a/backends/text-to-speech/windows/sphelper-scummvm.h b/backends/text-to-speech/windows/sphelper-scummvm.h
index 9ced239a34..93b2bb52f1 100644
--- a/backends/text-to-speech/windows/sphelper-scummvm.h
+++ b/backends/text-to-speech/windows/sphelper-scummvm.h
@@ -15,6 +15,7 @@
// crtdbg.h
// SPDebug.h
// atlbase.h
+// sapiddk.h
//
// 3. Include got added
// cwtype
@@ -45,10 +46,6 @@
#include <sapi.h>
#endif
-#ifndef __sapiddk_h__
-#include <sapiddk.h>
-#endif
-
#ifndef SPError_h
#include <SPError.h>
#endif
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 9e6d30cd3a..3399e45826 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -29,6 +29,17 @@
#include <basetyps.h>
#include <windows.h>
#include <Servprov.h>
+
+// Mingw-w64 is missing symbols for two guids declared in sapi.h which are used
+// by sphelper-scummvm.h. Mingw32 doesn't include any sapi headers or libraries
+// so the only way to currently build there is to manually use Microsoft's, in
+// which case the guids will be defined by their library.
+#if defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR)
+#include <initguid.h>
+DEFINE_GUID(SPDFID_Text, 0x7ceef9f9, 0x3d13, 0x11d2, 0x9e, 0xe7, 0x00, 0xc0, 0x4f, 0x79, 0x73, 0x96);
+DEFINE_GUID(SPDFID_WaveFormatEx, 0xc31adbae, 0x527f, 0x4ff5, 0xa2, 0x30, 0xf6, 0x2b, 0xb6, 0x1f, 0xf7, 0x0c);
+#endif
+
#include <sapi.h>
#include "backends/text-to-speech/windows/sphelper-scummvm.h"
#include "backends/platform/sdl/win32/win32_wrapper.h"