diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-04-08 13:50:39 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-04-08 13:50:39 +0300 |
commit | d4c002d5372176c131bd81981eebb60ace11cb90 (patch) | |
tree | f046a6d995a9b63688235de3a0fef5a4f7e10041 /source/gameengine/GamePlayer | |
parent | c29d7a2c2b056f9b432a6c6841b78353c6d267a9 (diff) | |
parent | 235f1feaf4f28f0d3bf3b608ba447b9b0ef5aedc (diff) |
Merge branch 'master' into gooseberry
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_Canvas.h | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp | 12 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Canvas.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h index acbea477e38..34cc9759a08 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.h +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h @@ -71,6 +71,8 @@ public: virtual void ResizeWindow(int width, int height) {} + virtual void GetDisplayDimensions(int &width, int &height) {} + /** * \section Methods inherited from abstract base class RAS_ICanvas. */ diff --git a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp index 556f85804ea..09eb1691dae 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp @@ -121,6 +121,18 @@ bool GPG_Canvas::GetSwapInterval(int& intervalOut) return false; } +void GPG_Canvas::GetDisplayDimensions(int &width, int &height) + { + unsigned int uiwidth; + unsigned int uiheight; + + GHOST_ISystem *system = GHOST_ISystem::getSystem(); + system->getMainDisplayDimensions(uiwidth, uiheight); + + width = uiwidth; + height = uiheight; +} + void GPG_Canvas::ResizeWindow(int width, int height) { if (m_window->getState() == GHOST_kWindowStateFullScreen) diff --git a/source/gameengine/GamePlayer/ghost/GPG_Canvas.h b/source/gameengine/GamePlayer/ghost/GPG_Canvas.h index 337c2cedf55..18afbf6cd9e 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Canvas.h +++ b/source/gameengine/GamePlayer/ghost/GPG_Canvas.h @@ -63,6 +63,8 @@ public: virtual float GetMouseNormalizedX(int x); virtual float GetMouseNormalizedY(int y); + virtual void GetDisplayDimensions(int &width, int &height); + virtual void ResizeWindow(int width, int height); virtual void SetFullScreen(bool enable); virtual bool GetFullScreen(); |