From 912bbf364c1c287f891291229d30226a5a71eed9 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Wed, 9 Oct 2019 12:19:31 -0700 Subject: 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 --- backends/text-to-speech/windows/windows-text-to-speech.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backends/text-to-speech/windows/windows-text-to-speech.cpp') 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 #include #include + +// 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 +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 #include "backends/text-to-speech/windows/sphelper-scummvm.h" #include "backends/platform/sdl/win32/win32_wrapper.h" -- cgit v1.2.3