v0.3.1: added additional checks for display scaling.

This commit is contained in:
Evan Debenham
2015-07-15 13:38:12 -04:00
parent cde5a4f63b
commit 0a6c9c6e7f
@@ -78,8 +78,10 @@ public class PixelScene extends Scene {
minHeight = MIN_HEIGHT_P;
}
maxDefaultZoom = (int)Math.min(Game.width/minWidth, Game.height/minHeight);
defaultZoom = ShatteredPixelDungeon.scale();
if (defaultZoom < Math.ceil( Game.density * 2 )){
if (defaultZoom < Math.ceil( Game.density * 2 ) || defaultZoom > maxDefaultZoom){
defaultZoom = (int)Math.ceil( Game.density * 2.5 );
while ((
Game.width / defaultZoom < minWidth ||
@@ -90,8 +92,6 @@ public class PixelScene extends Scene {
ShatteredPixelDungeon.scale(defaultZoom);
}
maxDefaultZoom = (int)Math.min(Game.width/minWidth, Game.height/minHeight);
minZoom = 1;
maxZoom = defaultZoom * 2;