target iOS 13.4

This commit is contained in:
Jesús A. Álvarez 2024-02-17 13:31:39 +01:00
parent 3b4244e4e3
commit ef6ef61037
3 changed files with 8 additions and 27 deletions

View File

@ -1926,7 +1926,7 @@
DEVELOPMENT_TEAM = UJXNDZ5TNU;
HEADER_SEARCH_PATHS = "$(SRCROOT)";
INFOPLIST_FILE = "Mini vMac/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -1957,7 +1957,7 @@
DEVELOPMENT_TEAM = UJXNDZ5TNU;
HEADER_SEARCH_PATHS = "$(SRCROOT)";
INFOPLIST_FILE = "Mini vMac/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

View File

@ -46,12 +46,7 @@
}
- (BOOL)isMouseEvent:(UIEvent *)event {
#if __IPHONE_13_4
if (@available(iOS 13.4, *)) {
return event.buttonMask != 0;
}
#endif
return NO;
return event.buttonMask != 0;
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {

View File

@ -13,17 +13,10 @@
#import "KBKeyboardView.h"
#import "KBKeyboardLayout.h"
@interface ViewController () <UIAdaptivePresentationControllerDelegate>
@interface ViewController () <UIAdaptivePresentationControllerDelegate, UIPointerInteractionDelegate>
@end
#ifdef __IPHONE_13_4
API_AVAILABLE(ios(13.4))
@interface ViewController (PointerInteraction) <UIPointerInteractionDelegate>
@end
#endif
static int8_t usb_to_adb_scancode[] = {
-1, -1, -1, -1, 0, 11, 8, 2, 14, 3, 5, 4, 34, 38, 40, 37,
46, 45, 31, 35, 12, 15, 1, 17, 32, 9, 13, 7, 16, 6, 18, 19,
@ -183,14 +176,10 @@ static int8_t usb_to_adb_scancode[] = {
pointingDeviceView = nil;
}
#ifdef __IPHONE_13_4
if (@available(iOS 13.4, *)) {
if (interaction == nil) {
interaction = [[UIPointerInteraction alloc] initWithDelegate: self];
[self.view addInteraction:interaction];
}
if (interaction == nil) {
interaction = [[UIPointerInteraction alloc] initWithDelegate: self];
[self.view addInteraction:interaction];
}
#endif
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION == 1
Class pointingDeviceClass = [TouchScreen class];
@ -512,10 +501,8 @@ static int8_t usb_to_adb_scancode[] = {
}
@end
#ifdef __IPHONE_13_4
API_AVAILABLE(ios(13.4))
@implementation ViewController (PointerInteraction)
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)){
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion {
if (request != nil) {
Point mouseLoc = [self mouseLocForCGPoint:request.location];
[[AppDelegate sharedEmulator] setMouseX:mouseLoc.h Y:mouseLoc.v];
@ -528,4 +515,3 @@ API_AVAILABLE(ios(13.4))
}
@end
#endif