From 8575e9f2f68c145fbe11701b2c43315d5bc485e2 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh Date: Fri, 18 Feb 2022 16:21:48 +0700 Subject: [PATCH] Bug fixes - Random infinite game launching process - Input not working on 1.13+ when `Restart before launching game` is enabled. --- JavaApp/src/main/java/net/kdt/pojavlaunch/PLaunchApp.java | 5 ----- Natives/SurfaceViewController.m | 2 ++ Natives/ios_uikit_bridge.m | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/JavaApp/src/main/java/net/kdt/pojavlaunch/PLaunchApp.java b/JavaApp/src/main/java/net/kdt/pojavlaunch/PLaunchApp.java index ed7870a3..b9be416e 100644 --- a/JavaApp/src/main/java/net/kdt/pojavlaunch/PLaunchApp.java +++ b/JavaApp/src/main/java/net/kdt/pojavlaunch/PLaunchApp.java @@ -95,10 +95,6 @@ public class PLaunchApp { } UIKit.updateProgressSafe(0, "Selected Minecraft version: " + mcver); - try { - Thread.sleep(1000); - } catch (InterruptedException e) {} - new File(Tools.DIR_HOME_VERSION + "/" + mcver).mkdirs(); try { @@ -227,7 +223,6 @@ public class PLaunchApp { } currProgress++; downloaded++; - }); } executor.shutdown(); diff --git a/Natives/SurfaceViewController.m b/Natives/SurfaceViewController.m index 3f2f132a..a7d0d1b9 100644 --- a/Natives/SurfaceViewController.m +++ b/Natives/SurfaceViewController.m @@ -138,6 +138,8 @@ const void * _CGDataProviderGetBytePointerCallbackOSMESA(void *info) { isControlModifiable = NO; setPreference(@"internal_selected_account", nil); + isUseStackQueueCall = getPreference(@"internal_useStackQueue"); + setPreference(@"internal_useStackQueue", nil); [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; [self setNeedsUpdateOfScreenEdgesDeferringSystemGestures]; diff --git a/Natives/ios_uikit_bridge.m b/Natives/ios_uikit_bridge.m index 02dcd206..2c0e28b8 100644 --- a/Natives/ios_uikit_bridge.m +++ b/Natives/ios_uikit_bridge.m @@ -130,6 +130,7 @@ void UIKit_launchJarFile(const char* filepath) { } void UIKit_launchMinecraftSurfaceVC() { + setPreference(@"internal_useStackQueue", @(isUseStackQueueCall ? YES : NO)); setPreference(@"internal_selected_account", @(getenv("POJAV_INTERNAL_SELECTED_ACCOUNT"))); dispatch_async(dispatch_get_main_queue(), ^{ if ([getPreference(@"restart_before_launch") boolValue]) {