fix mouse cursor in OSX reported by Jay Riley

Hide Menu and Doc when in fullscreen mode on OSX


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1261 dfc29bdd-3216-0410-991c-e03cc46cb475
master
teella 2008-02-26 13:12:53 +00:00
parent 0eb29afe81
commit 405a2682ba
2 changed files with 712 additions and 708 deletions

View File

@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <Carbon/Carbon.h>
#include "CIrrDeviceMacOSX.h"
#include "IEventReceiver.h"
@ -79,6 +80,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(video::E_DRIVER_TYPE driverType,
CIrrDeviceMacOSX::~CIrrDeviceMacOSX()
{
SetSystemUIMode(kUIModeNormal, 0);
closeDevice();
}
@ -233,6 +235,8 @@ bool CIrrDeviceMacOSX::createWindow(const irr::core::dimension2d<irr::s32>& wind
if (result)
{
if (_window == NULL)
SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
CGLSetCurrentContext(_cglcontext);
newSwapInterval = (vsync) ? 1 : 0;
CGLSetParameter(_cglcontext,kCGLCPSwapInterval,&newSwapInterval);
@ -516,7 +520,7 @@ void CIrrDeviceMacOSX::storeMouseLocation()
else
{
x = (int)p.x;
y = _screenHeight - (int)p.y;
y = (int)p.y;
}
((CCursorControl *)CursorControl)->updateInternalCursorPosition(x,y);
@ -537,7 +541,7 @@ void CIrrDeviceMacOSX::setMouseLocation(int x,int y)
else
{
p.x = (float) x;
p.y = (float) (_height - y);
p.y = (float) y;
}
c.x = p.x;