diff --git a/Makefile b/Makefile index b35c4b94..c52b34a3 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,6 @@ extras: @if [ '$(IOS)' = '0' ]; then \ mkdir -p Natives/build/PojavLauncher.app/Base.lproj; \ xcrun actool Natives/Assets.xcassets --compile Natives/resources --platform iphoneos --minimum-deployment-target 12.0 --app-icon AppIcon --output-partial-info-plist /dev/null || exit 1; \ - ibtool --compile Natives/build/PojavLauncher.app/Base.lproj/MinecraftSurface.storyboardc Natives/en.lproj/MinecraftSurface.storyboard || exit 1; \ ibtool --compile Natives/build/PojavLauncher.app/Base.lproj/LaunchScreen.storyboardc Natives/en.lproj/LaunchScreen.storyboard || exit 1; \ elif [ '$(IOS)' = '1' ]; then \ echo 'Due to the required tools not being available, you cannot compile the extras for PojavLauncher with an iOS device.'; \ diff --git a/Natives/SurfaceViewController.m b/Natives/SurfaceViewController.m index 0aa9d91b..d974bfd1 100644 --- a/Natives/SurfaceViewController.m +++ b/Natives/SurfaceViewController.m @@ -77,6 +77,9 @@ int notchOffset; savedWidth = roundf(width * screenScale); savedHeight = roundf(height * screenScale); + MGLKView *surfaceView = [[MGLKView alloc] initWithFrame:self.view.frame]; + self.view = surfaceView; + touchView = [[UIView alloc] initWithFrame:self.view.frame]; notchOffset = insets.left; @@ -191,9 +194,8 @@ int notchOffset; viewController = self; - MGLKView *view = glView = (MGLKView *) self.view; - view.drawableDepthFormat = MGLDrawableDepthFormat24; - view.enableSetNeedsDisplay = YES; + surfaceView.drawableDepthFormat = MGLDrawableDepthFormat24; + surfaceView.enableSetNeedsDisplay = YES; // [self setPreferredFramesPerSecond:1000]; // Init GLES @@ -207,7 +209,7 @@ int notchOffset; NSLog(@"Failed to create ES context"); } - view.context = self.context; + surfaceView.context = self.context; #ifndef USE_EGL glContext = self.context; #endif diff --git a/Natives/en.lproj/MinecraftSurface.storyboard b/Natives/en.lproj/MinecraftSurface.storyboard deleted file mode 100644 index 0a3373b9..00000000 --- a/Natives/en.lproj/MinecraftSurface.storyboard +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Natives/en.lproj/MinecraftSurface.storyboardc/2-view-3.nib b/Natives/en.lproj/MinecraftSurface.storyboardc/2-view-3.nib deleted file mode 100644 index 6fc6983c..00000000 Binary files a/Natives/en.lproj/MinecraftSurface.storyboardc/2-view-3.nib and /dev/null differ diff --git a/Natives/en.lproj/MinecraftSurface.storyboardc/Info.plist b/Natives/en.lproj/MinecraftSurface.storyboardc/Info.plist deleted file mode 100644 index 3c05c62b..00000000 Binary files a/Natives/en.lproj/MinecraftSurface.storyboardc/Info.plist and /dev/null differ diff --git a/Natives/en.lproj/MinecraftSurface.storyboardc/MinecraftSurfaceVC.nib b/Natives/en.lproj/MinecraftSurface.storyboardc/MinecraftSurfaceVC.nib deleted file mode 100644 index f7f0f265..00000000 Binary files a/Natives/en.lproj/MinecraftSurface.storyboardc/MinecraftSurfaceVC.nib and /dev/null differ diff --git a/Natives/ios_uikit_bridge.m b/Natives/ios_uikit_bridge.m index f2bdf7ea..83c1f63d 100644 --- a/Natives/ios_uikit_bridge.m +++ b/Natives/ios_uikit_bridge.m @@ -149,8 +149,7 @@ void UIKit_launchJarFile(const char* filepath) { void UIKit_launchMinecraftSurfaceVC() { dispatch_async(dispatch_get_main_queue(), ^{ UIViewController *rootController = UIApplication.sharedApplication.windows.lastObject.rootViewController; - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MinecraftSurface" bundle:nil]; - SurfaceViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"MinecraftSurfaceVC"]; + SurfaceViewController *vc = [[SurfaceViewController alloc] init]; vc.modalPresentationStyle = UIModalPresentationFullScreen; [rootController presentViewController:vc animated:YES completion:nil]; // rootController.childForScreenEdgesDeferringSystemGestures = vc;