[Scummvm-git-logs] scummvm branch-2-1 -> abe1961548239451fe7e06bc4561f34111ec789c

lotharsm serra at scummvm.org
Fri Oct 11 16:16:31 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
abe1961548 TTS: Enable in Mingw-w64 builds


Commit: abe1961548239451fe7e06bc4561f34111ec789c
    https://github.com/scummvm/scummvm/commit/abe1961548239451fe7e06bc4561f34111ec789c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-11T16:16:07+02:00

Commit Message:
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

Backported from 2.2.0git

Changed paths:
    backends/text-to-speech/windows/sphelper-scummvm.h
    backends/text-to-speech/windows/windows-text-to-speech.cpp
    configure


diff --git a/backends/text-to-speech/windows/sphelper-scummvm.h b/backends/text-to-speech/windows/sphelper-scummvm.h
index 9ced239..93b2bb5 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 9e6d30c..3399e45 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"
diff --git a/configure b/configure
index 63132a8..0adf0bb 100755
--- a/configure
+++ b/configure
@@ -4243,9 +4243,6 @@ if test "$_tts" = auto ; then
 int main(void) { return 0; }
 EOF
 			cc_check -lsapi -lole32 && _tts=yes
-			if test "$_host_os" = "mingw32" ; then
-				_tts=no
-			fi
 			;;
 		linux*)
 			cat > $TMPC << EOF





More information about the Scummvm-git-logs mailing list