This commit is contained in:
Anuken 2020-05-07 14:04:58 -04:00
parent 561e94617c
commit 6ea8a0f583

View File

@ -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();