don't query window's surface scale if graphics are not retina

This commit is contained in:
codeanticode
2015-05-30 20:27:41 -04:00
parent 7cf5d676a2
commit 3d8732dafa
+8 -2
View File
@@ -523,8 +523,14 @@ public class PSurfaceJOGL implements PSurface {
}
public float getPixelScale() {
window.getCurrentSurfaceScale(currentPixelScale);
return currentPixelScale[0];
if (graphics.is2X()) {
// Even if the graphics are retina, the user might have moved the window
// into a non-retina monitor, so we need to check
window.getCurrentSurfaceScale(currentPixelScale);
return currentPixelScale[0];
} else {
return 1;
}
}
public Component getComponent() {