mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-13 00:05:23 +07:00
cleanup
This commit is contained in:
parent
561e94617c
commit
6ea8a0f583
@ -141,15 +141,12 @@ public class LoadRenderer{
|
||||
|
||||
|
||||
float aspect = 1.94f;
|
||||
Draw.flush();
|
||||
//portrait
|
||||
if(graphics.getHeight() > graphics.getWidth()){
|
||||
//aspect = 1f/2;
|
||||
}
|
||||
|
||||
Vec2 size = Scaling.fit.apply(graphics.getWidth(), graphics.getWidth() / aspect, graphics.getWidth(), graphics.getHeight());
|
||||
|
||||
int viewportWidth = (int)size.x, viewportHeight = (int)size.y, viewportX = (int)(graphics.getWidth()/2f - size.x/2f), viewportY = (int)(graphics.getHeight()/2f - size.y/2f);
|
||||
|
||||
//portrait? no viewport
|
||||
if(graphics.getHeight() > graphics.getWidth()){
|
||||
viewportHeight = graphics.getHeight();
|
||||
viewportWidth = graphics.getWidth();
|
||||
|
Loading…
Reference in New Issue
Block a user