Commit 405a2682 authored by teella's avatar teella

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
parent 0eb29afe
This diff is collapsed.
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment