diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index b9f0f4fcd..c0e3eeb2d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -231,6 +231,12 @@ public class ShatteredPixelDungeon extends Game { dispWidth = view.getMeasuredWidth(); dispHeight = view.getMeasuredHeight(); + + if ((dispWidth > dispHeight) != landscape){ + int tmp = dispWidth; + dispWidth = dispHeight; + dispHeight = tmp; + } float dispRatio = dispWidth / (float)dispHeight;