Browse Source

Revert "Negative x/y position for initial window centers on screen"

This reverts commit ba88d2657ce92e16a767acfd6b88008bc740282c.
JoshEngebretson 10 years ago
parent
commit
f7f4650b52

+ 5 - 5
Script/AtomicEditor/editor/Preferences.ts

@@ -157,12 +157,12 @@ class PreferencesFormat {
         }
 
         this.playerWindow = {
-            x: -1, // negative value centers on screen
-            y: -1,
-            width: 1280,
-            height: 720,
+            x: 0,
+            y: 0,
+            width: 0,
+            height: 0,
             monitor: 0,
-            maximized: false
+            maximized: true
         }
 
     }

+ 0 - 13
Source/Atomic/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -2200,19 +2200,6 @@ bool Graphics::OpenWindow(int width, int height, bool resizable, bool borderless
         if (borderless)
             flags |= SDL_WINDOW_BORDERLESS;
 
-        // ATOMIC BEGIN
-
-        // if position is negative, center the window
-        if (position_.x_ < 0 || position_.y_ < 0)
-        {
-            IntVector2 size = GetDesktopResolution();
-            position_.x_ = size.x_/2 -  width/2;
-            position_.y_ = size.y_/2 -  height/2;
-        }
-
-        // ATOMIC END
-
-
         impl_->window_ = SDL_CreateWindow(windowTitle_.CString(), position_.x_, position_.y_, width, height, flags);
     }
     else

+ 0 - 12
Source/Atomic/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -2390,18 +2390,6 @@ bool Graphics::OpenWindow(int width, int height, bool resizable, bool borderless
         if (borderless)
             flags |= SDL_WINDOW_BORDERLESS;
 
-        // ATOMIC BEGIN
-
-        // if position is negative, center the window
-        if (position_.x_ < 0 || position_.y_ < 0)
-        {
-            IntVector2 size = GetDesktopResolution();
-            position_.x_ = size.x_/2 -  width/2;
-            position_.y_ = size.y_/2 -  height/2;
-        }
-
-        // ATOMIC END
-
         impl_->window_ = SDL_CreateWindow(windowTitle_.CString(), position_.x_, position_.y_, width, height, flags);
     }
     else

+ 5 - 5
Source/AtomicEditor/Application/AEEditorCommon.cpp

@@ -182,12 +182,12 @@ bool AEEditorCommon::CreateDefaultPreferences(String& path, JSONValue& prefs)
     editorWindow["maximized"] = true;
 
     JSONValue playerWindow;
-    playerWindow["x"] = -1; // negative value will center window
-    playerWindow["y"] = -1;
-    playerWindow["width"] = 1280;
-    playerWindow["height"] = 720;
+    playerWindow["x"] = 0;
+    playerWindow["y"] = 0;
+    playerWindow["width"] = 0;
+    playerWindow["height"] = 0;
     playerWindow["monitor"] = 0;
-    playerWindow["maximized"] = false;
+    playerWindow["maximized"] = true;
 
     root["editorWindow"] = editorWindow;
     root["playerWindow"] = playerWindow;