Moved SAPI code into a define.

This commit is contained in:
Barry Rowe 2020-04-16 11:57:39 -07:00
parent 289be872f3
commit adb5c4c7dd
3 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,12 @@ ifeq ($(HAVE_NVDA), 1)
LIBS += nvdaControllerClient64.dll LIBS += nvdaControllerClient64.dll
endif endif
ifeq ($(HAVE_SAPI), 1)
LIBS += sapi.dll
endif
ifeq ($(HAVE_GL_CONTEXT),) ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT = 0 HAVE_GL_CONTEXT = 0
HAVE_GL_MODERN = 0 HAVE_GL_MODERN = 0

View File

@ -878,9 +878,11 @@ static bool create_win32_process(char* cmd)
return true; return true;
} }
#ifdef HAVE_SAPI
#define COBJMACROS #define COBJMACROS
#include <sapi.h> #include <sapi.h>
#include <ole2.h> #include <ole2.h>
#endif
static ISpVoice* pVoice = NULL; static ISpVoice* pVoice = NULL;
#ifdef HAVE_NVDA #ifdef HAVE_NVDA
@ -928,6 +930,7 @@ static bool is_narrator_running_windows(void)
*/ */
} }
#endif #endif
#ifdef HAVE_SAPI
else else
{ {
SPVOICESTATUS pStatus; SPVOICESTATUS pStatus;
@ -940,6 +943,7 @@ static bool is_narrator_running_windows(void)
return false; return false;
} }
} }
#endif
return false; return false;
} }
@ -1012,6 +1016,7 @@ static bool accessibility_speak_windows(int speed,
return true; return true;
} }
#endif #endif
#ifdef HAVE_SAPI
else else
{ {
/* stop the old voice if running */ /* stop the old voice if running */
@ -1038,6 +1043,7 @@ static bool accessibility_speak_windows(int speed,
} }
return true; return true;
} }
#endif
} }
#endif #endif

View File

@ -1,6 +1,7 @@
HAVE_LIBRETRO= # Libretro library used HAVE_LIBRETRO= # Libretro library used
HAVE_ASSETS_DIR= # Assets install directory HAVE_ASSETS_DIR= # Assets install directory
HAVE_NVDA=no # NVDA support HAVE_NVDA=no # NVDA support
HAVE_SAPI=no # SAPI support
HAVE_BLISSBOX=auto # Blissbox support HAVE_BLISSBOX=auto # Blissbox support
HAVE_ANGLE=no # ANGLE support (OpenGL wrapper) HAVE_ANGLE=no # ANGLE support (OpenGL wrapper)
HAVE_CONFIGFILE=yes # Config file support HAVE_CONFIGFILE=yes # Config file support