v3.2.2: fullscreen now defaults on in Android and is forced on in iOS

This commit is contained in:
Evan Debenham
2025-08-24 16:56:06 -04:00
parent a3901bb104
commit 01bc465114
3 changed files with 6 additions and 17 deletions

View File

@@ -64,7 +64,7 @@ public class SPDSettings extends GameSettings {
}
public static boolean fullscreen() {
return getBoolean( KEY_FULLSCREEN, DeviceCompat.isDesktop() );
return getBoolean( KEY_FULLSCREEN, true );
}
public static void zoom( int value ) {
@@ -437,8 +437,8 @@ public class SPDSettings extends GameSettings {
public static Point windowResolution(){
return new Point(
getInt( KEY_WINDOW_WIDTH, 800, 720, Integer.MAX_VALUE ),
getInt( KEY_WINDOW_HEIGHT, 600, 400, Integer.MAX_VALUE )
1920,
1080
);
}

View File

@@ -98,7 +98,7 @@ public class IOSLauncher extends IOSApplication.Delegate {
config.depthFormat = MGLDrawableDepthFormat.None;
config.hdpiMode = HdpiMode.Pixels;
config.hideHomeIndicator = SPDSettings.fullscreen();
config.hideHomeIndicator = true;
config.overrideRingerSwitch = SPDSettings.ignoreSilentMode();
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();

View File

@@ -28,7 +28,6 @@ import com.badlogic.gdx.backends.iosrobovm.objectal.OALSimpleAudio;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.watabou.input.ControllerHandler;
import com.watabou.noosa.Game;
@@ -55,22 +54,12 @@ public class IOSPlatformSupport extends PlatformSupport {
} else {
UIApplication.getSharedApplication().setStatusBarHidden(true);
}
if (!SPDSettings.fullscreen()) {
int insetChange = Gdx.graphics.getSafeInsetBottom() - Game.bottomInset;
Game.bottomInset = Gdx.graphics.getSafeInsetBottom();
Game.height -= insetChange;
} else {
Game.height += Game.bottomInset;
Game.bottomInset = 0;
}
Gdx.gl.glViewport(0, Game.bottomInset, Game.width, Game.height);
}
@Override
public boolean supportsFullScreen() {
//iOS supports hiding UI via drawing into the gesture safe area
return Gdx.graphics.getSafeInsetBottom() > 0;
//fullscreen is always enabled on iOS
return false;
}
@Override