From 858aa2137a42fb60d0484c702f07e94e2de94026 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 26 Feb 2012 03:40:19 +0100 Subject: NEWT Screen.getCurrentScreenModeIntern() !ScreenMode case: Attempt to get screen size if 0. --- src/newt/classes/jogamp/newt/ScreenImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/newt/classes') diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java index 0653c5921..fdf80586a 100644 --- a/src/newt/classes/jogamp/newt/ScreenImpl.java +++ b/src/newt/classes/jogamp/newt/ScreenImpl.java @@ -493,6 +493,9 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener { res = getCurrentScreenModeImpl(); } if(null == res) { + if( 0==getWidth()*getHeight() ) { + updateVirtualScreenOriginAndSize(); + } int[] props = new int[ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL]; int i = 0; props[i++] = 0; // set later for verification of iterator -- cgit v1.2.3