Browse Source

Implementation for ogl and dx11. Clean up.

rsredsq 10 years ago
parent
commit
5eef83e4ad

+ 0 - 1
Script/TypeScript/AtomicWork.d.ts

@@ -43,7 +43,6 @@ declare module Atomic {
         fullscreen: boolean;
         resizable: boolean;
         borderless: boolean;
-        maximized: boolean;
 
     }
 

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

@@ -2791,6 +2791,13 @@ int Graphics::GetMonitorsNumber()
 {
     return SDL_GetNumVideoDisplays();
 }
+bool Graphics::GetMaximized()
+{
+    if (!impl_->window_)
+        return false;
+
+    return SDL_GetWindowFlags(impl_->window_) & SDL_WINDOW_MAXIMIZED;
+}
 // ATOMIC END
 
 }

+ 2 - 0
Source/Atomic/Graphics/Direct3D11/D3D11Graphics.h

@@ -504,6 +504,8 @@ public:
     int GetCurrentMonitor();
     /// Return the available monitors number
     int GetMonitorsNumber();
+    /// Return true if window is maximized
+    bool GetMaximized();
     // ATOMIC END
 
 private:

+ 7 - 0
Source/Atomic/Graphics/OpenGL/OGLGraphics.cpp

@@ -3306,6 +3306,13 @@ int Graphics::GetMonitorsNumber()
 {
     return SDL_GetNumVideoDisplays();
 }
+bool Graphics::GetMaximized()
+{
+    if (!impl_->window_)
+        return false;
+
+    return SDL_GetWindowFlags(impl_->window_) & SDL_WINDOW_MAXIMIZED;
+}
 // ATOMIC END
 
 }

+ 2 - 0
Source/Atomic/Graphics/OpenGL/OGLGraphics.h

@@ -530,6 +530,8 @@ public:
     int GetCurrentMonitor();
     /// Return the available monitors number
     int GetMonitorsNumber();
+    /// Return true if window is maximized
+    bool GetMaximized();
     // ATOMIC END
 
 private:

+ 0 - 1
Source/AtomicEditor/PlayerMode/AEPlayerEvents.h

@@ -26,7 +26,6 @@ EVENT(E_IPCPLAYERWINDOWCHANGED, IPCPlayerWindowChanged)
     PARAM(P_WIDTH, Width);
     PARAM(P_HEIGHT, Height);
     PARAM(P_MONITOR, Monitor);
-    PARAM(P_MAXIMIZED, Maximized);
 }
 
 EVENT(E_PLAYERQUIT, PlayerQuit)

+ 0 - 1
Source/AtomicEditor/PlayerMode/AEPlayerMode.cpp

@@ -249,7 +249,6 @@ void PlayerMode::HandleExitRequest(StringHash eventType, VariantMap& eventData)
     data[P_WIDTH] = graphics->GetWidth();
     data[P_HEIGHT] = graphics->GetHeight();
     data[P_MONITOR] = graphics->GetCurrentMonitor();
-    data[P_MAXIMIZED] = graphics->GetMaximized();
     ipc_->SendEventToBroker(E_IPCPLAYERWINDOWCHANGED, data);
     SendEvent(E_PLAYERQUIT);
 }