whoops. set the units per pixel property using the right scaling
This commit is contained in:
parent
9f6a882dac
commit
5517e75221
|
@ -6,16 +6,16 @@ public class LargePixelScreenViewport extends ScreenViewport {
|
||||||
@Override
|
@Override
|
||||||
public void update(int screenWidth, int screenHeight, boolean centerCamera) {
|
public void update(int screenWidth, int screenHeight, boolean centerCamera) {
|
||||||
// TODO: these might need tweaking, this is fairly arbitrary
|
// TODO: these might need tweaking, this is fairly arbitrary
|
||||||
if (viewportWidth < 640 || viewportHeight < 480)
|
if (screenWidth < 640 || screenHeight < 480)
|
||||||
setUnitsPerPixel(1);
|
setUnitsPerPixel(1.0f);
|
||||||
else if (viewportWidth < 960 || viewportHeight < 720)
|
else if (screenWidth < 960 || screenHeight < 720)
|
||||||
setUnitsPerPixel(2);
|
setUnitsPerPixel(1.0f / 2.0f);
|
||||||
else if (viewportWidth < 1280 || viewportHeight < 960)
|
else if (screenWidth < 1280 || screenHeight < 960)
|
||||||
setUnitsPerPixel(3);
|
setUnitsPerPixel(1.0f / 3.0f);
|
||||||
else if (viewportWidth < 1920 || viewportHeight < 1080)
|
else if (screenWidth < 1920 || screenHeight < 1080)
|
||||||
setUnitsPerPixel(4);
|
setUnitsPerPixel(1.0f / 4.0f);
|
||||||
else
|
else
|
||||||
setUnitsPerPixel(5);
|
setUnitsPerPixel(1.0f / 5.0f);
|
||||||
|
|
||||||
// TODO: desktop "retina" / 4K display sizes?
|
// TODO: desktop "retina" / 4K display sizes?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue