diff options
author | Thomas Szepe <HG1_public@gmx.net> | 2015-04-07 19:32:25 +0300 |
---|---|---|
committer | Thomas Szepe <HG1_public@gmx.net> | 2015-04-07 19:32:25 +0300 |
commit | e36b0cb8f32fc4302499c87e5c2b4c1ecc7a6543 (patch) | |
tree | 53fcd2ebd7775bebc00f8ca5960a2bd18145e17e /source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp | |
parent | f9f3c29a3a5b558e09c36076521bdafc91e7e326 (diff) |
BGE: New API method getDisplayDimensions
This patch adds a new API function to get the actual display dimensions in pixels.
Reviewers: dfelinto, sybren, lordloki, moguri
Reviewed By: lordloki, moguri
Differential Revision: https://developer.blender.org/D648
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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) |