[Scummvm-git-logs] scummvm master -> 912bbf364c1c287f891291229d30226a5a71eed9

bluegr bluegr at gmail.com
Thu Oct 10 21:55:17 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:
912bbf364c TTS: Enable in Mingw-w64 builds


Commit: 912bbf364c1c287f891291229d30226a5a71eed9
    https://github.com/scummvm/scummvm/commit/912bbf364c1c287f891291229d30226a5a71eed9
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-10T22:55:12+03: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

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 401da53..86d80c4 100755
--- a/configure
+++ b/configure
@@ -4239,6 +4239,15 @@ echocheck "TTS libraries"
 if test "$_tts" = auto ; then
 	_tts=no
 	case $_host_os in
+		mingw*)
+			cat > $TMPC << EOF
+#include <windows.h>
+#include <Servprov.h>
+#include <sapi.h>
+int main(void) { return 0; }
+EOF
+			cc_check -lsapi -lole32 && _tts=yes
+			;;
 		linux*)
 			cat > $TMPC << EOF
 #include <speech-dispatcher/libspeechd.h>





More information about the Scummvm-git-logs mailing list