mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
macos: default Accessibility on if VoiceOver is on
This commit is contained in:
parent
a6c82df0fd
commit
77da47613e
@ -70,7 +70,7 @@
|
||||
#include "switch_performance_profiles.h"
|
||||
#endif
|
||||
|
||||
#if IOS
|
||||
#if __APPLE__
|
||||
#include "ui/drivers/cocoa/apple_platform.h"
|
||||
#endif
|
||||
|
||||
@ -2880,7 +2880,7 @@ void config_set_defaults(void *data)
|
||||
load_timezone(settings->arrays.timezone);
|
||||
#endif
|
||||
|
||||
#if IOS
|
||||
#if __APPLE__
|
||||
configuration_set_bool(settings,
|
||||
settings->bools.accessibility_enable, RAIsVoiceOverRunning());
|
||||
#endif
|
||||
|
@ -1,10 +1,7 @@
|
||||
#ifndef COCOA_APPLE_PLATFORM_H
|
||||
#define COCOA_APPLE_PLATFORM_H
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
/* this comes from UIKit but you cannot #include UIKit from C */
|
||||
extern bool RAIsVoiceOverRunning(void);
|
||||
#endif
|
||||
|
||||
#if TARGET_OS_TV
|
||||
#include "config_file.h"
|
||||
|
@ -62,6 +62,14 @@ extern bool RAIsVoiceOverRunning(void)
|
||||
{
|
||||
return UIAccessibilityIsVoiceOverRunning();
|
||||
}
|
||||
#elif OSX
|
||||
#import <AppKit/AppKit.h>
|
||||
extern bool RAIsVoiceOverRunning(void)
|
||||
{
|
||||
if (@available(macOS 10.13, *))
|
||||
return [[NSWorkspace sharedWorkspace] isVoiceOverEnabled];
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
|
||||
|
Loading…
x
Reference in New Issue
Block a user