diff options
author | Sven Gothel <[email protected]> | 2011-12-26 00:00:25 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-26 00:00:25 +0100 |
commit | e93efe83a96fcacb812a8ff8f4102578f88423f9 (patch) | |
tree | b3cde4c79ac643cbeb8bb60dc74bfd732366f17c /src/newt/classes/com | |
parent | 024b0f630e7392d2cdf586b4db42f2111a50a00c (diff) |
NEWT/Android: MonitorMode: Don't validate refreshRate (0 on some devices); AndroidWindow: Trigger ScreenModeChanged only if Screen is already valid.
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/util/MonitorMode.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java index 5a8bf5bf2..8104f207a 100644 --- a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java +++ b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java @@ -43,8 +43,9 @@ public class MonitorMode { int refreshRate; public MonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int refreshRate) { - if(null==surfaceSize || refreshRate<=0) { - throw new IllegalArgumentException("surfaceSize must be set and refreshRate greater 0"); + // Don't validate screenSizeMM and refreshRate, since they may not be supported by the OS + if(null==surfaceSize) { + throw new IllegalArgumentException("surfaceSize must be set ("+surfaceSize+")"); } this.surfaceSize=surfaceSize; this.screenSizeMM=screenSizeMM; |