mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-06-01 10:41:33 +00:00
visionOS: always use touchscreen
This commit is contained in:
parent
7c1f280374
commit
33e01e0847
|
@ -166,8 +166,12 @@ API_AVAILABLE(ios(13.4))
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION == 1
|
||||||
|
Class pointingDeviceClass = [TouchScreen class];
|
||||||
|
#else
|
||||||
BOOL useTrackPad = [[NSUserDefaults standardUserDefaults] boolForKey:@"trackpad"];
|
BOOL useTrackPad = [[NSUserDefaults standardUserDefaults] boolForKey:@"trackpad"];
|
||||||
Class pointingDeviceClass = useTrackPad ? [TrackPad class] : [TouchScreen class];
|
Class pointingDeviceClass = useTrackPad ? [TrackPad class] : [TouchScreen class];
|
||||||
|
#endif
|
||||||
pointingDeviceView = [[pointingDeviceClass alloc] initWithFrame:self.view.bounds];
|
pointingDeviceView = [[pointingDeviceClass alloc] initWithFrame:self.view.bounds];
|
||||||
pointingDeviceView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
pointingDeviceView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||||
[self.view insertSubview:pointingDeviceView aboveSubview:self.screenView];
|
[self.view insertSubview:pointingDeviceView aboveSubview:self.screenView];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user