v0.9.0a: fixed a rare performance bug when density is mis-reported
This commit is contained in:
parent
ff71b997b1
commit
188f039dc7
|
@ -41,6 +41,7 @@ import com.watabou.noosa.Gizmo;
|
|||
import com.watabou.noosa.Scene;
|
||||
import com.watabou.noosa.Visual;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.GameMath;
|
||||
import com.watabou.utils.Reflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -87,13 +88,7 @@ public class PixelScene extends Scene {
|
|||
defaultZoom = SPDSettings.scale();
|
||||
|
||||
if (defaultZoom < Math.ceil( Game.density * 2 ) || defaultZoom > maxDefaultZoom){
|
||||
defaultZoom = (int)Math.ceil( Game.density * 2.5 );
|
||||
while ((
|
||||
Game.width / defaultZoom < minWidth ||
|
||||
Game.height / defaultZoom < minHeight
|
||||
) && defaultZoom > 1) {
|
||||
defaultZoom--;
|
||||
}
|
||||
defaultZoom = (int)GameMath.gate(2, (int)Math.ceil( Game.density * 2.5 ), maxDefaultZoom);
|
||||
}
|
||||
|
||||
minZoom = 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user