Fix full screen on OSX, well as fixed as its ever been. Apperently in render to main it always shown the FPS on the bottom in full screen.
This commit is contained in:
parent
8faefa3672
commit
ae3c5a64cc
|
@ -34,7 +34,7 @@ void cInterfaceAGL::Swap()
|
||||||
// Show the current FPS
|
// Show the current FPS
|
||||||
void cInterfaceAGL::UpdateFPSDisplay(const char *text)
|
void cInterfaceAGL::UpdateFPSDisplay(const char *text)
|
||||||
{
|
{
|
||||||
[[GLWin.cocoaWin window] setTitle: [NSString stringWithUTF8String: text]];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create rendering window.
|
// Create rendering window.
|
||||||
|
@ -80,11 +80,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen) {
|
[[GLWin.cocoaWin window] makeFirstResponder:GLWin.cocoaWin];
|
||||||
CGDisplayCapture(CGMainDisplayID());
|
|
||||||
[GLWin.cocoaWin setLevel: CGShieldingWindowLevel()];
|
|
||||||
}
|
|
||||||
|
|
||||||
[GLWin.cocoaCtx setView: GLWin.cocoaWin];
|
[GLWin.cocoaCtx setView: GLWin.cocoaWin];
|
||||||
[[GLWin.cocoaWin window] makeKeyAndOrderFront: nil];
|
[[GLWin.cocoaWin window] makeKeyAndOrderFront: nil];
|
||||||
|
|
||||||
|
@ -115,4 +111,16 @@ void cInterfaceAGL::Shutdown()
|
||||||
[GLWin.cocoaCtx release];
|
[GLWin.cocoaCtx release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cInterfaceAGL::Update()
|
||||||
|
{
|
||||||
|
if( s_backbuffer_width == [GLWin.cocoaWin frame].size.width
|
||||||
|
&& s_backbuffer_height == [GLWin.cocoaWin frame].size.height)
|
||||||
|
return;
|
||||||
|
|
||||||
|
s_backbuffer_width = [GLWin.cocoaWin frame].size.width;
|
||||||
|
s_backbuffer_height = [GLWin.cocoaWin frame].size.height;
|
||||||
|
|
||||||
|
[GLWin.cocoaCtx update];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ public:
|
||||||
void UpdateFPSDisplay(const char *Text);
|
void UpdateFPSDisplay(const char *Text);
|
||||||
bool Create(void *&window_handle);
|
bool Create(void *&window_handle);
|
||||||
bool MakeCurrent();
|
bool MakeCurrent();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
void Update();
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue