v2.3.1: updated libGDX to 1.12.1 and mobiVM to 2.3.20

This commit is contained in:
Evan Debenham
2024-01-22 13:42:30 -05:00
parent 5069d034c9
commit 4056c48545
9 changed files with 30 additions and 19 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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());

View File

@@ -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