浏览代码

Use default prefs if requested monitor is not available

rsredsq 10 年之前
父节点
当前提交
efab3e4473
共有 1 个文件被更改,包括 2 次插入4 次删除
  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";