Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stokes <kupomail@gmail.com>2011-08-03 12:02:54 +0400
committerDaniel Stokes <kupomail@gmail.com>2011-08-03 12:02:54 +0400
commit28ae3ba7556a05ad50f55418993a65fa48ce2b7f (patch)
tree7556459254b3ad27d8cb543014bfc57a1d68fc6d /source/gameengine/GamePlayer/ghost/GPG_Application.cpp
parent3dc7f4508371cde5af4efe4f2aa76d620bb51eaa (diff)
Adding a checkbox to the UI to allow the full screen Blender Player to use the current desktop resolution instead of the resolution setting.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index f8ac6977385..2dc1d2db215 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -370,13 +370,16 @@ bool GPG_Application::startFullScreen(
int bpp,int frequency,
const bool stereoVisual,
const int stereoMode,
- const GHOST_TUns16 samples)
+ const GHOST_TUns16 samples,
+ bool useDesktop)
{
bool success;
+ GHOST_TUns32 sysWidth=0, sysHeight=0;
+ fSystem->getMainDisplayDimensions(sysWidth, sysHeight);
// Create the main window
GHOST_DisplaySetting setting;
- setting.xPixels = width;
- setting.yPixels = height;
+ setting.xPixels = (useDesktop) ? sysWidth : width;
+ setting.yPixels = (useDesktop) ? sysHeight : height;
setting.bpp = bpp;
setting.frequency = frequency;