mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
(Win32) Cleanup accessibility_speak_windows
This commit is contained in:
parent
647bdc5cbd
commit
4a20709645
@ -956,8 +956,6 @@ static bool accessibility_speak_windows(int speed,
|
|||||||
bool res = false;
|
bool res = false;
|
||||||
const char* speeds[10] = {"-10", "-7.5", "-5", "-2.5", "0", "2", "4", "6", "8", "10"};
|
const char* speeds[10] = {"-10", "-7.5", "-5", "-2.5", "0", "2", "4", "6", "8", "10"};
|
||||||
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
if (speed < 1)
|
if (speed < 1)
|
||||||
speed = 1;
|
speed = 1;
|
||||||
else if (speed > 10)
|
else if (speed > 10)
|
||||||
@ -986,7 +984,6 @@ static bool accessibility_speak_windows(int speed,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
pi_set = true;
|
pi_set = true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
#ifdef HAVE_NVDA
|
#ifdef HAVE_NVDA
|
||||||
else if (USE_NVDA)
|
else if (USE_NVDA)
|
||||||
@ -1002,23 +999,19 @@ static bool accessibility_speak_windows(int speed,
|
|||||||
RARCH_LOG("Error communicating with NVDA\n");
|
RARCH_LOG("Error communicating with NVDA\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
nvdaController_cancelSpeech();
|
nvdaController_cancelSpeech();
|
||||||
}
|
|
||||||
|
|
||||||
if (USE_NVDA_BRAILLE)
|
if (USE_NVDA_BRAILLE)
|
||||||
nvdaController_brailleMessage(wc);
|
nvdaController_brailleMessage(wc);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
nvdaController_speakText(wc);
|
nvdaController_speakText(wc);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SAPI
|
#ifdef HAVE_SAPI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
HRESULT hr;
|
||||||
/* stop the old voice if running */
|
/* stop the old voice if running */
|
||||||
if (pVoice)
|
if (pVoice)
|
||||||
{
|
{
|
||||||
@ -1043,9 +1036,9 @@ static bool accessibility_speak_windows(int speed,
|
|||||||
|
|
||||||
hr = ISpVoice_Speak(pVoice, wtext, SPF_ASYNC /*SVSFlagsAsync*/, NULL);
|
hr = ISpVoice_Speak(pVoice, wtext, SPF_ASYNC /*SVSFlagsAsync*/, NULL);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user