mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-27 01:25:41 +08:00
Merge pull request #1562 from bettse/ios_safety
preprocessor macros for iOS
This commit is contained in:
commit
fc2cc9d2a8
2 changed files with 18 additions and 1 deletions
|
@ -8,6 +8,15 @@
|
|||
#ifndef lconfig_h
|
||||
#define lconfig_h
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
|
||||
#define system(s) ((s)==NULL ? 0 : -1)
|
||||
#endif // end iOS
|
||||
#elif defined(__ANDROID__)
|
||||
#define system(s) ((s)==NULL ? 0 : -1)
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
|
@ -20,7 +20,12 @@
|
|||
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
#import <AppKit/NSApplication.h>
|
||||
#endif
|
||||
|
||||
static id activity = nil;
|
||||
|
||||
|
@ -49,8 +54,11 @@ void enableAppNap() { }
|
|||
#endif
|
||||
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
void makeUnfocusable() { }
|
||||
void makeFocusable() { }
|
||||
//OS X Version 10.6 is defined in OS X 10.6 and later
|
||||
#if defined(MAC_OS_X_VERSION_10_6)
|
||||
#elif defined(MAC_OS_X_VERSION_10_6)
|
||||
void makeUnfocusable() {
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue