Merge pull request #31543 from fogine/#31503-ios-touch-events-stolen

Fixes iOS>=11 stealing touch events
This commit is contained in:
Rémi Verschelde 2019-08-23 09:04:43 +02:00 committed by GitHub
commit de6783eaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -39,6 +39,10 @@
- (void)didReceiveMemoryWarning;
- (void)viewDidLoad;
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures;
- (BOOL)prefersStatusBarHidden;
@end

View File

@ -83,6 +83,18 @@ int add_cmdline(int p_argc, char **p_args) {
printf("*********** did receive memory warning!\n");
};
- (void)viewDidLoad {
[super viewDidLoad];
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
}
}
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
return UIRectEdgeAll;
}
- (BOOL)shouldAutorotate {
switch (OS::get_singleton()->get_screen_orientation()) {
case OS::SCREEN_SENSOR: