diff options
author | Sven Gothel <[email protected]> | 2023-01-31 22:40:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-31 22:40:55 +0100 |
commit | 84fe8402e4845ee1e14071e4922a7f2b3b445851 (patch) | |
tree | 637a497114c46c08e670a61befafcdfe023f7af9 /src | |
parent | 97de7b52b8c0ca7f1afff394321a15e7f3df293d (diff) |
NEWT MonitorDevice: Fix pixelScale storage, own float[2], don't reuse given object
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/MonitorDevice.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java index 97b04a4b3..9ad194ce8 100644 --- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java +++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java @@ -153,7 +153,11 @@ public abstract class MonitorDevice { this.sizeMM = sizeMM; this.originalMode = currentMode; this.supportedModes = supportedModes; - this.pixelScale = null != pixelScale ? pixelScale : new float[] { ScalableSurface.IDENTITY_PIXELSCALE, ScalableSurface.IDENTITY_PIXELSCALE }; + if( null != pixelScale ) { + this.pixelScale = new float[] { pixelScale[0], pixelScale[1] }; + } else { + this.pixelScale = new float[] { ScalableSurface.IDENTITY_PIXELSCALE, ScalableSurface.IDENTITY_PIXELSCALE }; + } this.viewportPU = viewportPU; this.viewportWU = viewportWU; |