Removed MinecraftSurface storyboard dependence
This commit is contained in:
1 parent
fa62e8d268
commit
a3976102a9
7 files changed
+7
-35
No files matched your search
@@ -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.'; \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="2">
|
||||
<device id="retina6_1" orientation="landscape" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Surface View Controller-->
|
||||
<scene sceneID="5">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="MinecraftSurfaceVC" id="2" customClass="SurfaceViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="pBr-B6-SMb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="cBT-OE-m5j"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="3" customClass="MGLKView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="896" height="414"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="25" y="29"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user