summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-13 14:00:14 +0100
committerGitHub <noreply@github.com>2019-12-13 14:00:14 +0100
commitcf3a863fa92253ecb833a66cc2acb1463e6002d1 (patch)
tree42c4e4566b1aaeb63ded09c03e50132b8738c71b /platform
parent9432520449f3b1affdca37aea366f4cf358bc560 (diff)
parent4d61118f64c1c56f50fbe706277fd0b1499f6d98 (diff)
Merge pull request #34229 from NoFr1ends/fix-home-indicator-ios
Allow to change the home indicator behaviour on iOS
Diffstat (limited to 'platform')
-rw-r--r--platform/iphone/view_controller.h2
-rw-r--r--platform/iphone/view_controller.mm10
2 files changed, 12 insertions, 0 deletions
diff --git a/platform/iphone/view_controller.h b/platform/iphone/view_controller.h
index 68e3bc64fc..c2ef95acb5 100644
--- a/platform/iphone/view_controller.h
+++ b/platform/iphone/view_controller.h
@@ -45,4 +45,6 @@
- (BOOL)prefersStatusBarHidden;
+- (BOOL)prefersHomeIndicatorAutoHidden;
+
@end
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index e52ad92bf2..5bdce6277b 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -32,6 +32,8 @@
#include "os_iphone.h"
+#include "core/project_settings.h"
+
extern "C" {
int add_path(int, char **);
@@ -129,6 +131,14 @@ int add_cmdline(int p_argc, char **p_args) {
return YES;
}
+- (BOOL)prefersHomeIndicatorAutoHidden {
+ if (GLOBAL_GET("display/window/ios/hide_home_indicator")) {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
#ifdef GAME_CENTER_ENABLED
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController {
//[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone