v2.3.1: updated libGDX to 1.12.1 and mobiVM to 2.3.20
This commit is contained in:
@@ -130,7 +130,16 @@ public class InputHandler extends InputAdapter {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean touchCancelled(int screenX, int screenY, int pointer, int button) {
|
||||
//currently emulating functionality from libGDX 1.11.0, do we keep this?
|
||||
//in particular this is probably a more graceful way to handle things like system swipes on iOS
|
||||
//whereas previously they generated garbage inputs sometimes
|
||||
//which were then fixed in v2.2.2
|
||||
return touchUp(screenX, screenY, pointer, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean touchDragged(int screenX, int screenY, int pointer) {
|
||||
PointerEvent.addIfExisting(new PointerEvent(screenX, screenY, pointer, PointerEvent.Type.DOWN));
|
||||
|
||||
@@ -40,6 +40,7 @@ public abstract class PlatformSupport {
|
||||
|
||||
public void vibrate( int millis ){
|
||||
//regular GDX vibration by default
|
||||
//TODO should this trigger controller vibration if available?
|
||||
Gdx.input.vibrate( millis );
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,8 @@ public class AndroidLauncher extends AndroidApplication {
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE :
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT );
|
||||
}
|
||||
|
||||
//TODO libGDX offers its own immersive mode functionality, do we want to use it?
|
||||
|
||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||
config.depth = 0;
|
||||
|
||||
@@ -24,9 +24,9 @@ allprojects {
|
||||
appAndroidMinSDK = 14
|
||||
appAndroidTargetSDK = 33
|
||||
|
||||
gdxVersion = '1.11.0'
|
||||
gdxVersion = '1.12.1'
|
||||
gdxControllersVersion = '2.2.4-SNAPSHOT'
|
||||
robovmVersion = '2.3.19'
|
||||
robovmVersion = '2.3.20'
|
||||
}
|
||||
version = appVersionName
|
||||
|
||||
|
||||
@@ -114,12 +114,12 @@ dependencies {
|
||||
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"
|
||||
|
||||
//we use LWJGL tinyFD directly to display crash messages
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-windows"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-macos"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-macos-arm64"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-linux"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-linux-arm64"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-windows"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-macos"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-macos-arm64"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-linux"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-linux-arm64"
|
||||
|
||||
implementation project(':services:updates:githubUpdates')
|
||||
implementation project(':services:news:shatteredNews')
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleLightContent</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<string>11.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<executableName>${appExecutable}</executableName>
|
||||
<mainClass>${appMainclass}</mainClass>
|
||||
<os>ios</os>
|
||||
<arch>thumbv7</arch>
|
||||
<arch>arm64</arch>
|
||||
<target>ios</target>
|
||||
<iosInfoPList>Info.plist</iosInfoPList>
|
||||
|
||||
@@ -41,13 +41,11 @@ import org.robovm.apple.foundation.NSBundle;
|
||||
import org.robovm.apple.foundation.NSException;
|
||||
import org.robovm.apple.foundation.NSMutableDictionary;
|
||||
import org.robovm.apple.foundation.NSObject;
|
||||
import org.robovm.apple.foundation.NSProcessInfo;
|
||||
import org.robovm.apple.foundation.NSString;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
||||
import org.robovm.apple.uikit.UIApplication;
|
||||
import org.robovm.apple.uikit.UIRectEdge;
|
||||
import org.robovm.apple.uikit.UIScreen;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -107,12 +105,9 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
||||
//game has to ignore input from system gestures itself, otherwise there is lag on
|
||||
//every button press on the corner of the screen. Currently this is accomplished via
|
||||
//clearing all pointer events on the first frame after the game is resumed.
|
||||
//TODO this may not be needed anymore with libgdx 1.12.1
|
||||
config.screenEdgesDeferringSystemGestures = UIRectEdge.All;
|
||||
|
||||
if (NSProcessInfo.getSharedProcessInfo().getOperatingSystemVersion().getMajorVersion() >= 11) {
|
||||
config.preferredFramesPerSecond = (int)(UIScreen.getMainScreen().getMaximumFramesPerSecond());
|
||||
}
|
||||
|
||||
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();
|
||||
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.ios;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.backends.iosrobovm.objectal.OALSimpleAudio;
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
|
||||
@@ -81,8 +82,12 @@ public class IOSPlatformSupport extends PlatformSupport {
|
||||
}
|
||||
|
||||
public void vibrate( int millis ){
|
||||
//gives a short vibrate on iPhone 6+, no vibration otherwise
|
||||
AudioServices.playSystemSound(1520);
|
||||
if (Gdx.input.isPeripheralAvailable(Input.Peripheral.HapticFeedback)){
|
||||
super.vibrate( millis );
|
||||
} else {
|
||||
//devices without haptics support use a short vibrate on iPhone 6+, no vibration otherwise
|
||||
AudioServices.playSystemSound(1520);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user