Browse Source

Use default prefs if requested monitor is not available

rsredsq 10 years ago
parent
commit
efab3e4473
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Script/AtomicEditor/ui/Shortcuts.ts

+ 2 - 4
Script/AtomicEditor/ui/Shortcuts.ts

@@ -30,11 +30,9 @@ class Shortcuts extends Atomic.ScriptObject {
         } else {
             var playerWindow = Preferences.getInstance().playerWindow;
             if (playerWindow) {
-                var desktopResolution = Atomic.graphics.getDesktopResolution();
-                if (playerWindow.width > desktopResolution[0]) playerWindow.width = desktopResolution[0];
-                if (playerWindow.height > desktopResolution[1]) playerWindow.height = desktopResolution[1];
                 if ((playerWindow.monitor + 1) > Atomic.graphics.getMonitorsNumber()) {
-                    var args = "--windowwidth " + playerWindow.width + " --windowheight " + playerWindow.height + " --resizable";
+                    //will use default settings if monitor is not available
+                    var args = "--resizable";
                     Atomic.editorMode.playProject(args, debug);
                 } else {
                     var args = "--windowposx " + playerWindow.x + " --windowposy " + playerWindow.y + " --windowwidth " + playerWindow.width + " --windowheight " + playerWindow.height + " --resizable";