From 84fe8402e4845ee1e14071e4922a7f2b3b445851 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 31 Jan 2023 22:40:55 +0100 Subject: NEWT MonitorDevice: Fix pixelScale storage, own float[2], don't reuse given object --- src/newt/classes/com/jogamp/newt/MonitorDevice.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3