v2.3.1: updated libGDX to 1.12.1 and mobiVM to 2.3.20
This commit is contained in:
@@ -131,6 +131,15 @@ public class InputHandler extends InputAdapter {
|
|||||||
return true;
|
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
|
@Override
|
||||||
public synchronized boolean touchDragged(int screenX, int screenY, int pointer) {
|
public synchronized boolean touchDragged(int screenX, int screenY, int pointer) {
|
||||||
PointerEvent.addIfExisting(new PointerEvent(screenX, screenY, pointer, PointerEvent.Type.DOWN));
|
PointerEvent.addIfExisting(new PointerEvent(screenX, screenY, pointer, PointerEvent.Type.DOWN));
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public abstract class PlatformSupport {
|
|||||||
|
|
||||||
public void vibrate( int millis ){
|
public void vibrate( int millis ){
|
||||||
//regular GDX vibration by default
|
//regular GDX vibration by default
|
||||||
|
//TODO should this trigger controller vibration if available?
|
||||||
Gdx.input.vibrate( millis );
|
Gdx.input.vibrate( millis );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ public class AndroidLauncher extends AndroidApplication {
|
|||||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT );
|
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO libGDX offers its own immersive mode functionality, do we want to use it?
|
||||||
|
|
||||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||||
config.depth = 0;
|
config.depth = 0;
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ allprojects {
|
|||||||
appAndroidMinSDK = 14
|
appAndroidMinSDK = 14
|
||||||
appAndroidTargetSDK = 33
|
appAndroidTargetSDK = 33
|
||||||
|
|
||||||
gdxVersion = '1.11.0'
|
gdxVersion = '1.12.1'
|
||||||
gdxControllersVersion = '2.2.4-SNAPSHOT'
|
gdxControllersVersion = '2.2.4-SNAPSHOT'
|
||||||
robovmVersion = '2.3.19'
|
robovmVersion = '2.3.20'
|
||||||
}
|
}
|
||||||
version = appVersionName
|
version = appVersionName
|
||||||
|
|
||||||
|
|||||||
@@ -114,12 +114,12 @@ dependencies {
|
|||||||
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"
|
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"
|
||||||
|
|
||||||
//we use LWJGL tinyFD directly to display crash messages
|
//we use LWJGL tinyFD directly to display crash messages
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3"
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-windows"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-windows"
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-macos"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-macos"
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-macos-arm64"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-macos-arm64"
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-linux"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-linux"
|
||||||
implementation "org.lwjgl:lwjgl-tinyfd:3.3.1:natives-linux-arm64"
|
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-linux-arm64"
|
||||||
|
|
||||||
implementation project(':services:updates:githubUpdates')
|
implementation project(':services:updates:githubUpdates')
|
||||||
implementation project(':services:news:shatteredNews')
|
implementation project(':services:news:shatteredNews')
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<key>UIStatusBarStyle</key>
|
<key>UIStatusBarStyle</key>
|
||||||
<string>UIStatusBarStyleLightContent</string>
|
<string>UIStatusBarStyleLightContent</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>9.0</string>
|
<string>11.0</string>
|
||||||
<key>UIDeviceFamily</key>
|
<key>UIDeviceFamily</key>
|
||||||
<array>
|
<array>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<executableName>${appExecutable}</executableName>
|
<executableName>${appExecutable}</executableName>
|
||||||
<mainClass>${appMainclass}</mainClass>
|
<mainClass>${appMainclass}</mainClass>
|
||||||
<os>ios</os>
|
<os>ios</os>
|
||||||
<arch>thumbv7</arch>
|
|
||||||
<arch>arm64</arch>
|
<arch>arm64</arch>
|
||||||
<target>ios</target>
|
<target>ios</target>
|
||||||
<iosInfoPList>Info.plist</iosInfoPList>
|
<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.NSException;
|
||||||
import org.robovm.apple.foundation.NSMutableDictionary;
|
import org.robovm.apple.foundation.NSMutableDictionary;
|
||||||
import org.robovm.apple.foundation.NSObject;
|
import org.robovm.apple.foundation.NSObject;
|
||||||
import org.robovm.apple.foundation.NSProcessInfo;
|
|
||||||
import org.robovm.apple.foundation.NSString;
|
import org.robovm.apple.foundation.NSString;
|
||||||
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
||||||
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
||||||
import org.robovm.apple.uikit.UIApplication;
|
import org.robovm.apple.uikit.UIApplication;
|
||||||
import org.robovm.apple.uikit.UIRectEdge;
|
import org.robovm.apple.uikit.UIRectEdge;
|
||||||
import org.robovm.apple.uikit.UIScreen;
|
|
||||||
|
|
||||||
import java.io.File;
|
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
|
//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
|
//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.
|
//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;
|
config.screenEdgesDeferringSystemGestures = UIRectEdge.All;
|
||||||
|
|
||||||
if (NSProcessInfo.getSharedProcessInfo().getOperatingSystemVersion().getMajorVersion() >= 11) {
|
|
||||||
config.preferredFramesPerSecond = (int)(UIScreen.getMainScreen().getMaximumFramesPerSecond());
|
|
||||||
}
|
|
||||||
|
|
||||||
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();
|
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();
|
||||||
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
|
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
package com.shatteredpixel.shatteredpixeldungeon.ios;
|
package com.shatteredpixel.shatteredpixeldungeon.ios;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
|
import com.badlogic.gdx.Input;
|
||||||
import com.badlogic.gdx.backends.iosrobovm.objectal.OALSimpleAudio;
|
import com.badlogic.gdx.backends.iosrobovm.objectal.OALSimpleAudio;
|
||||||
import com.badlogic.gdx.graphics.Pixmap;
|
import com.badlogic.gdx.graphics.Pixmap;
|
||||||
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
|
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
|
||||||
@@ -81,9 +82,13 @@ public class IOSPlatformSupport extends PlatformSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void vibrate( int millis ){
|
public void vibrate( int millis ){
|
||||||
//gives a short vibrate on iPhone 6+, no vibration otherwise
|
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);
|
AudioServices.playSystemSound(1520);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setHonorSilentSwitch( boolean value ) {
|
public void setHonorSilentSwitch( boolean value ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user