(Win32) Cleanup accessibility_speak_windows

This commit is contained in:
twinaphex 2020-05-20 16:26:39 +02:00
parent 647bdc5cbd
commit 4a20709645

View File

@ -956,8 +956,6 @@ static bool accessibility_speak_windows(int speed,
bool res = false;
const char* speeds[10] = {"-10", "-7.5", "-5", "-2.5", "0", "2", "4", "6", "8", "10"};
HRESULT hr;
if (speed < 1)
speed = 1;
else if (speed > 10)
@ -986,7 +984,6 @@ static bool accessibility_speak_windows(int speed,
return true;
}
pi_set = true;
return true;
}
#ifdef HAVE_NVDA
else if (USE_NVDA)
@ -1002,23 +999,19 @@ static bool accessibility_speak_windows(int speed,
RARCH_LOG("Error communicating with NVDA\n");
return false;
}
else
{
nvdaController_cancelSpeech();
}
if (USE_NVDA_BRAILLE)
nvdaController_brailleMessage(wc);
else
{
nvdaController_speakText(wc);
}
return true;
}
#endif
#ifdef HAVE_SAPI
else
{
HRESULT hr;
/* stop the old voice if running */
if (pVoice)
{
@ -1043,9 +1036,9 @@ static bool accessibility_speak_windows(int speed,
hr = ISpVoice_Speak(pVoice, wtext, SPF_ASYNC /*SVSFlagsAsync*/, NULL);
}
return true;
}
#endif
return true;
}
#endif