Permalink
Browse files

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

  • Loading branch information...
codeanticode committed May 31, 2015
1 parent a4d9289 commit 96d8859cb925d09b8789a0a960b43ccc20d5fc5e
Showing with 8 additions and 2 deletions.
  1. +8 −2 core/src/processing/opengl/PSurfaceJOGL.java
@@ -523,8 +523,14 @@ public void setSize(int width, int height) {
}
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() {

0 comments on commit 96d8859

Please sign in to comment.