File tree Expand file tree Collapse file tree
src/com/jpexs/decompiler/flash/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2972,15 +2972,17 @@ private static void initGui() {
29722972 System .setProperty ("sun.java2d.noddraw" , "true" );
29732973
29742974 if (System .getProperty ("sun.java2d.uiScale" ) == null ) { //it was not set by commandline, etc.
2975- double scaleToUse = Configuration .uiScale .get ();
2976- if (! Configuration . uiScale . hasValue () || Configuration .uiScale .get () == null ) {
2975+ Double scaleToUse = Configuration .uiScale .get ();
2976+ if (scaleToUse == null || ! Configuration .uiScale .hasValue () ) {
29772977 // Auto-detect from current screen. Do NOT persist to config so the scale is
29782978 // re-detected on each launch (prevents stale 4K scale being applied on a
29792979 // lower-DPI monitor after a display change).
29802980 GraphicsConfiguration configuration = View .getMainDefaultScreenDevice ().getDefaultConfiguration ();
29812981 AffineTransform transform = configuration .getDefaultTransform ();
29822982 if (transform != null ) {
29832983 scaleToUse = transform .getScaleX ();
2984+ } else {
2985+ scaleToUse = 1.0 ;
29842986 }
29852987 }
29862988 System .setProperty ("sun.java2d.uiScale" , "" + scaleToUse );
You can’t perform that action at this time.
0 commit comments