summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/iphone/game_center.h2
-rw-r--r--platform/iphone/game_center.mm10
-rw-r--r--platform/iphone/view_controller.mm3
3 files changed, 13 insertions, 2 deletions
diff --git a/platform/iphone/game_center.h b/platform/iphone/game_center.h
index 4fe13db8fc..8f180d1638 100644
--- a/platform/iphone/game_center.h
+++ b/platform/iphone/game_center.h
@@ -56,6 +56,8 @@ public:
void request_achievement_descriptions();
Error show_game_center(Variant p_params);
+ void game_center_closed();
+
int get_pending_event_count();
Variant pop_pending_event();
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index 9b4018a4ba..79c056776d 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -314,10 +314,18 @@ Error GameCenter::show_game_center(Variant p_params) {
}
[root_controller presentViewController: controller animated: YES completion:nil];
-
+
return OK;
};
+void GameCenter::game_center_closed() {
+
+ Dictionary ret;
+ ret["type"] = "show_game_center";
+ ret["result"] = "ok";
+ pending_events.push_back(ret);
+}
+
int GameCenter::get_pending_event_count() {
return pending_events.size();
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index f04264cfd9..bc9950979e 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -130,7 +130,8 @@ int add_cmdline(int p_argc, char** p_args) {
}
- (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController {
- printf("in finish");
+ //[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone
+ GameCenter::get_singleton()->game_center_closed();
[gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
}