v3.3.2: Reverted metalangle iOS backend to v1.13.1 to fix A7/A8 crashes
This commit is contained in:
committed by
Evan Debenham
parent
26bd0aada2
commit
80231df6eb
@@ -46,7 +46,10 @@ dependencies {
|
|||||||
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
||||||
implementation "com.mobidevelop.robovm:robovm-rt:$robovmVersion"
|
implementation "com.mobidevelop.robovm:robovm-rt:$robovmVersion"
|
||||||
implementation "com.mobidevelop.robovm:robovm-cocoatouch:$robovmVersion"
|
implementation "com.mobidevelop.robovm:robovm-cocoatouch:$robovmVersion"
|
||||||
implementation "com.badlogicgames.gdx:gdx-backend-robovm-metalangle:$gdxVersion"
|
//FIXME using a prior version of metalangle backend as 1.13.5+ crashes on A7 and A8 devices
|
||||||
|
// Yes this is dangerous, the old backend seems to only work with libGDX 1.14.0 incidentally
|
||||||
|
// Ideally the next release of libGDX will fix this and this can simply use $gdxVersion again
|
||||||
|
implementation "com.badlogicgames.gdx:gdx-backend-robovm-metalangle:1.13.1"
|
||||||
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
||||||
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
|
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
|
||||||
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-ios:$gdxControllersVersion"
|
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-ios:$gdxControllersVersion"
|
||||||
|
|||||||
@@ -22,8 +22,10 @@
|
|||||||
package com.shatteredpixel.shatteredpixeldungeon.ios;
|
package com.shatteredpixel.shatteredpixeldungeon.ios;
|
||||||
|
|
||||||
import com.badlogic.gdx.Files;
|
import com.badlogic.gdx.Files;
|
||||||
|
import com.badlogic.gdx.backends.iosrobovm.DefaultIOSInput;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
|
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
|
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
|
||||||
|
import com.badlogic.gdx.backends.iosrobovm.IOSInput;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.IOSPreferences;
|
import com.badlogic.gdx.backends.iosrobovm.IOSPreferences;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableColorFormat;
|
import com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableColorFormat;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableDepthFormat;
|
import com.badlogic.gdx.backends.iosrobovm.bindings.metalangle.MGLDrawableDepthFormat;
|
||||||
@@ -45,6 +47,7 @@ import org.robovm.apple.foundation.NSObject;
|
|||||||
import org.robovm.apple.foundation.NSString;
|
import org.robovm.apple.foundation.NSString;
|
||||||
import org.robovm.apple.uikit.UIApplication;
|
import org.robovm.apple.uikit.UIApplication;
|
||||||
import org.robovm.apple.uikit.UIInterfaceOrientation;
|
import org.robovm.apple.uikit.UIInterfaceOrientation;
|
||||||
|
import org.robovm.apple.uikit.UITextField;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@@ -185,7 +188,22 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
|||||||
config.addIosDevice("SIMULATOR_64", "x86_64", 460);
|
config.addIosDevice("SIMULATOR_64", "x86_64", 460);
|
||||||
config.addIosDevice("SIMULATOR_ARM64", "arm64", 460);
|
config.addIosDevice("SIMULATOR_ARM64", "arm64", 460);
|
||||||
|
|
||||||
return new IOSApplication(new ShatteredPixelDungeon(new IOSPlatformSupport()), config);
|
return new IOSApplication(new ShatteredPixelDungeon(new IOSPlatformSupport()), config){
|
||||||
|
@Override
|
||||||
|
protected IOSInput createInput() {
|
||||||
|
//FIXME essentially a backport of a fix to text fields from libGDX ios backend 1.13.5
|
||||||
|
return new DefaultIOSInput(this){
|
||||||
|
@Override
|
||||||
|
public void setOnscreenKeyboardVisible(boolean visible, OnscreenKeyboardType type) {
|
||||||
|
super.setOnscreenKeyboardVisible(visible, type);
|
||||||
|
if (visible){
|
||||||
|
((UITextField)getActiveKeyboardTextField()).setText("x");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user