diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 6df835b9f..a315f5790 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -340,8 +340,8 @@ public class ShatteredPixelDungeon extends Game { int maxZoom = (int)Math.min(dispWidth/renderWidth, dispHeight/renderHeight); - renderWidth *= GameMath.gate( 2, (float)Math.ceil(maxZoom/2f), 4); - renderHeight *= GameMath.gate( 2, (float)Math.ceil(maxZoom/2f), 4); + renderWidth *= Math.max( 2, Math.round(maxZoom/2f)); + renderHeight *= Math.max( 2, Math.round(maxZoom/2f)); if (dispRatio > renderWidth / renderHeight){ renderWidth = renderHeight * dispRatio; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index 2bf23cc14..2f7c39759 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -158,20 +158,24 @@ public class WndSettings extends WndTabbed { @Override protected void onClick() { super.onClick(); - checked( !checked() ); - ShatteredPixelDungeon.scene().add(new WndOptions( - Messages.get(ScreenTab.class, "saver"), - Messages.get(ScreenTab.class, "saver_desc"), - Messages.get(ScreenTab.class, "okay"), - Messages.get(ScreenTab.class, "cancel")){ - @Override - protected void onSelect(int index) { - if (index == 0){ - checked( !checked() ); - ShatteredPixelDungeon.powerSaver(checked()); + if (checked()) { + checked(!checked()); + ShatteredPixelDungeon.scene().add(new WndOptions( + Messages.get(ScreenTab.class, "saver"), + Messages.get(ScreenTab.class, "saver_desc"), + Messages.get(ScreenTab.class, "okay"), + Messages.get(ScreenTab.class, "cancel")) { + @Override + protected void onSelect(int index) { + if (index == 0) { + checked(!checked()); + ShatteredPixelDungeon.powerSaver(checked()); + } } - } - }); + }); + } else { + ShatteredPixelDungeon.powerSaver(checked()); + } } }; chkSaver.setRect( 0, chkImmersive.bottom() + GAP_TINY, WIDTH, BTN_HEIGHT ); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties index edeb39906..ca301a71b 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties @@ -88,8 +88,8 @@ windows.wndsettings$screentab.brightness=Brightness windows.wndsettings$screentab.dark=Dark windows.wndsettings$screentab.bright=Bright windows.wndsettings$screentab.soft_keys=Hide Software Keys -windows.wndsettings$screentab.saver=Power Saver Mode -windows.wndsettings$screentab.saver_desc=Power saver mode draws the game at a reduced size and scales it up to fit your screen.\n\nThis will make the graphics less crisp, but will improve performance and battery life.\n\nYou may need to restart the game for changes to take effect. +windows.wndsettings$screentab.saver=Power Saver +windows.wndsettings$screentab.saver_desc=Power Saver mode draws the game at a reduced size and scales it up to fit your screen.\n\nThis will make graphics less crisp and enlarge the UI slightly, but will also improve performance and battery life.\n\nYou may need to restart the game for changes to take effect. windows.wndsettings$screentab.okay=Okay windows.wndsettings$screentab.cancel=Cancel windows.wndsettings$screentab.portrait=Switch to portrait