mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 01:21:47 +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"
|
#include "switch_performance_profiles.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IOS
|
#if __APPLE__
|
||||||
#include "ui/drivers/cocoa/apple_platform.h"
|
#include "ui/drivers/cocoa/apple_platform.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2880,7 +2880,7 @@ void config_set_defaults(void *data)
|
|||||||
load_timezone(settings->arrays.timezone);
|
load_timezone(settings->arrays.timezone);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IOS
|
#if __APPLE__
|
||||||
configuration_set_bool(settings,
|
configuration_set_bool(settings,
|
||||||
settings->bools.accessibility_enable, RAIsVoiceOverRunning());
|
settings->bools.accessibility_enable, RAIsVoiceOverRunning());
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
#ifndef COCOA_APPLE_PLATFORM_H
|
#ifndef COCOA_APPLE_PLATFORM_H
|
||||||
#define 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);
|
extern bool RAIsVoiceOverRunning(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
#include "config_file.h"
|
#include "config_file.h"
|
||||||
|
@ -62,6 +62,14 @@ extern bool RAIsVoiceOverRunning(void)
|
|||||||
{
|
{
|
||||||
return UIAccessibilityIsVoiceOverRunning();
|
return UIAccessibilityIsVoiceOverRunning();
|
||||||
}
|
}
|
||||||
|
#elif OSX
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
extern bool RAIsVoiceOverRunning(void)
|
||||||
|
{
|
||||||
|
if (@available(macOS 10.13, *))
|
||||||
|
return [[NSWorkspace sharedWorkspace] isVoiceOverEnabled];
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
|
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user