mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-06-16 04:29:31 +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
|
||||
|
||||
#if defined(TARGET_OS_VISION) && TARGET_OS_VISION == 1
|
||||
Class pointingDeviceClass = [TouchScreen class];
|
||||
#else
|
||||
BOOL useTrackPad = [[NSUserDefaults standardUserDefaults] boolForKey:@"trackpad"];
|
||||
Class pointingDeviceClass = useTrackPad ? [TrackPad class] : [TouchScreen class];
|
||||
#endif
|
||||
pointingDeviceView = [[pointingDeviceClass alloc] initWithFrame:self.view.bounds];
|
||||
pointingDeviceView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[self.view insertSubview:pointingDeviceView aboveSubview:self.screenView];
|
||||
|
|
Loading…
Reference in New Issue
Block a user