File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070#include "switch_performance_profiles.h"
7171#endif
7272
73- #if IOS
73+ #if __APPLE__
7474#include "ui/drivers/cocoa/apple_platform.h"
7575#endif
7676
@@ -2880,7 +2880,7 @@ void config_set_defaults(void *data)
28802880 load_timezone (settings -> arrays .timezone );
28812881#endif
28822882
2883- #if IOS
2883+ #if __APPLE__
28842884 configuration_set_bool (settings ,
28852885 settings -> bools .accessibility_enable , RAIsVoiceOverRunning ());
28862886#endif
Original file line number Diff line number Diff line change 11#ifndef COCOA_APPLE_PLATFORM_H
22#define COCOA_APPLE_PLATFORM_H
33
4- #if TARGET_OS_IPHONE
5- /* this comes from UIKit but you cannot #include UIKit from C */
64extern bool RAIsVoiceOverRunning (void );
7- #endif
85
96#if TARGET_OS_TV
107#include " config_file.h"
Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ extern bool RAIsVoiceOverRunning(void)
6262{
6363 return UIAccessibilityIsVoiceOverRunning ();
6464}
65+ #elif OSX
66+ #import < AppKit/AppKit.h>
67+ extern bool RAIsVoiceOverRunning (void )
68+ {
69+ if (@available (macOS 10.13 , *))
70+ return [[NSWorkspace sharedWorkspace ] isVoiceOverEnabled ];
71+ return false ;
72+ }
6573#endif
6674
6775#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
You can’t perform that action at this time.
0 commit comments