diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-13 10:53:21 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-13 10:53:21 +0400 |
commit | b22605c4dfc31f4e6e1419ca19cbd2ada57c52ce (patch) | |
tree | 1ca937957c88f20cb83a5bc26237ee141d72c0e8 /intern | |
parent | 82b4975ccfa8fe2c72278388a3cf3a8432cc9fb0 (diff) |
BGE #18691: Blenderplayer fullscreen messes up desktop on OS X Leopard. Applied patch #18705 by sbn. I cannot compile osx but the patch seems perfectly alright to me. Can OSX users confirm that it compiles well on the various OSX version?
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCarbon.cpp | 24 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCarbon.h | 8 |
2 files changed, 31 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index 067c8deee32..e6ab6528c70 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -34,7 +34,6 @@ * @date May 7, 2001 */ - #include <Carbon/Carbon.h> #include <ApplicationServices/ApplicationServices.h> #include "GHOST_SystemCarbon.h" @@ -430,6 +429,29 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow( return window; } +GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual) +{ + GHOST_TSuccess success = GHOST_kFailure; + + // need yo make this Carbon all on 10.5 for fullscreen to work correctly + CGCaptureAllDisplays(); + + success = GHOST_System::beginFullScreen( setting, window, stereoVisual); + + if( success != GHOST_kSuccess ) { + // fullscreen failed for other reasons, release + CGReleaseAllDisplays(); + } + + return success; +} + +GHOST_TSuccess GHOST_SystemCarbon::endFullScreen(void) +{ + CGReleaseAllDisplays(); + return GHOST_System::endFullScreen(); +} + /* this is an old style low level event queue. As we want to handle our own timers, this is ok. the full screen hack should be removed */ diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index 2a1d6325784..71ac5719370 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -118,6 +118,14 @@ public: const GHOST_TEmbedderWindowID parentWindow = 0 ); + virtual GHOST_TSuccess beginFullScreen( + const GHOST_DisplaySetting& setting, + GHOST_IWindow** window, + const bool stereoVisual + ); + + virtual GHOST_TSuccess endFullScreen( void ); + /*************************************************************************************** ** Event management functionality ***************************************************************************************/ |