Skip to content
Snippets Groups Projects
Commit 57860c71 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#61 Viewport vertical stretching

parent 7984ec61
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ public class XFillViewport extends Viewport {
@Override
public void update(int screenWidth, int screenHeight, boolean centerCamera) {
float newWorldHeight = getWorldWidth() / ((float) screenWidth / (float) screenHeight);
float newWorldHeight = Math.min(getWorldWidth() / ((float) screenWidth / (float) screenHeight), TablexiaSettings.getWorldSize());
// FIT into screen keeping at least minimum ration
//int screenX = (newWorldHeight < TablexiaSettings.getMinWorldHeight()) ? ((int) ((screenWidth - (screenHeight / TablexiaSettings.getMaximumRatio())) / 2)) : 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment