v3.2.3: brought back Android orientation setting as 'force landscape'

This commit is contained in:
Evan Debenham
2025-08-31 14:41:37 -04:00
parent 452f944678
commit 9ccdbc5e50
4 changed files with 33 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.android;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.net.ConnectivityManager;
import android.os.Build;
import android.view.DisplayCutout;
@@ -45,6 +46,9 @@ import java.util.regex.Pattern;
public class AndroidPlatformSupport extends PlatformSupport {
public void updateDisplaySize(){
AndroidLauncher.instance.setRequestedOrientation( SPDSettings.landscape() ?
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE :
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED );
//TODO seem to be existing bugs with handling split screen here, should look into that