v0.9.4: Restructured the options menu slightly:
- fullscreen moved to display settings - orientation toggle removed, game now uses system orientation
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<activity
|
||||
android:label="${appName}"
|
||||
android:name=".AndroidGame"
|
||||
android:screenOrientation="nosensor"
|
||||
android:screenOrientation="user"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize">
|
||||
</activity>
|
||||
|
||||
|
||||
@@ -88,13 +88,6 @@ public class AndroidGame extends AndroidApplication {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
//set desired orientation (if it exists) before initializing the app.
|
||||
if (SPDSettings.landscape() != null) {
|
||||
instance.setRequestedOrientation( SPDSettings.landscape() ?
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE :
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT );
|
||||
}
|
||||
|
||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||
config.depth = 0;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
|
||||
@@ -55,12 +55,6 @@ import java.util.regex.Pattern;
|
||||
public class AndroidPlatformSupport extends PlatformSupport {
|
||||
|
||||
public void updateDisplaySize(){
|
||||
if (SPDSettings.landscape() != null) {
|
||||
AndroidGame.instance.setRequestedOrientation( SPDSettings.landscape() ?
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE :
|
||||
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT );
|
||||
}
|
||||
|
||||
GLSurfaceView view = (GLSurfaceView) ((AndroidGraphics)Gdx.graphics).getView();
|
||||
|
||||
if (view.getMeasuredWidth() == 0 || view.getMeasuredHeight() == 0)
|
||||
@@ -72,13 +66,6 @@ public class AndroidPlatformSupport extends PlatformSupport {
|
||||
boolean fullscreen = Build.VERSION.SDK_INT < Build.VERSION_CODES.N
|
||||
|| !AndroidGame.instance.isInMultiWindowMode();
|
||||
|
||||
if (fullscreen && SPDSettings.landscape() != null
|
||||
&& (Game.dispWidth >= Game.dispHeight) != SPDSettings.landscape()){
|
||||
int tmp = Game.dispWidth;
|
||||
Game.dispWidth = Game.dispHeight;
|
||||
Game.dispHeight = tmp;
|
||||
}
|
||||
|
||||
float dispRatio = Game.dispWidth / (float)Game.dispHeight;
|
||||
|
||||
float renderWidth = dispRatio > 1 ? PixelScene.MIN_WIDTH_L : PixelScene.MIN_WIDTH_P;
|
||||
|
||||
Reference in New Issue
Block a user