mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 23:36:31 +08:00
preprocessor macros for iOS
This commit is contained in:
parent
f1501c9698
commit
8b21655458
|
@ -8,6 +8,15 @@
|
||||||
#ifndef lconfig_h
|
#ifndef lconfig_h
|
||||||
#define 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 <limits.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,12 @@
|
||||||
|
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <Foundation/NSProcessInfo.h>
|
#import <Foundation/NSProcessInfo.h>
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <AppKit/NSApplication.h>
|
#import <AppKit/NSApplication.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static id activity = nil;
|
static id activity = nil;
|
||||||
|
|
||||||
|
@ -49,8 +54,11 @@ void enableAppNap() { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS
|
||||||
|
void makeUnfocusable() { }
|
||||||
|
void makeFocusable() { }
|
||||||
//OS X Version 10.6 is defined in OS X 10.6 and later
|
//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() {
|
void makeUnfocusable() {
|
||||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
|
[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue