Browse Source

Merge pull request #90538 from migueldeicaza/order

Fix the initialization order for the iOS driver
Rémi Verschelde 1 năm trước cách đây
mục cha
commit
6d5981aad7
1 tập tin đã thay đổi với 3 bổ sung5 xóa
  1. 3 5
      platform/ios/os_ios.mm

+ 3 - 5
platform/ios/os_ios.mm

@@ -149,10 +149,6 @@ void OS_IOS::deinitialize_modules() {
 
 void OS_IOS::set_main_loop(MainLoop *p_main_loop) {
 	main_loop = p_main_loop;
-
-	if (main_loop) {
-		main_loop->initialize();
-	}
 }
 
 MainLoop *OS_IOS::get_main_loop() const {
@@ -181,7 +177,9 @@ bool OS_IOS::iterate() {
 }
 
 void OS_IOS::start() {
-	Main::start();
+	if (Main::start() == EXIT_SUCCESS) {
+		main_loop->initialize();
+	}
 
 	if (joypad_ios) {
 		joypad_ios->start_processing();