mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 14:42:27 +00:00
Accessibility: Refactor Android is_narrator_running to align with the rest of RetroArch accessibility API
This commit is contained in:
parent
49aeeee1f7
commit
216f55c7b2
@ -2906,7 +2906,7 @@ void config_set_defaults(void *data)
|
||||
|
||||
#ifdef ANDROID
|
||||
configuration_set_bool(settings,
|
||||
settings->bools.accessibility_enable, is_narrator_running(true));
|
||||
settings->bools.accessibility_enable, RAIsTalkbackRunning());
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -2966,7 +2966,7 @@ end:
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
static bool is_narrator_running_android(void)
|
||||
bool RAIsTalkbackRunning(void)
|
||||
{
|
||||
JNIEnv *env = jni_thread_getenv();
|
||||
jboolean jbool = JNI_FALSE;
|
||||
@ -2978,6 +2978,13 @@ static bool is_narrator_running_android(void)
|
||||
return jbool == JNI_TRUE;
|
||||
}
|
||||
|
||||
static bool is_narrator_running_android(void)
|
||||
{
|
||||
/* Screen reader is speaking on Android is controlled by the operating
|
||||
* system, so return false to align with the rest of the API. */
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool accessibility_speak_android(int speed,
|
||||
const char* speak_text, int priority)
|
||||
{
|
||||
|
@ -366,6 +366,9 @@ extern JNIEnv *jni_thread_getenv(void);
|
||||
void android_app_write_cmd(struct android_app *android_app, int8_t cmd);
|
||||
|
||||
extern struct android_app *g_android;
|
||||
|
||||
bool RAIsTalkbackRunning(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user