diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp index c18800ad9b..a703d849b9 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp @@ -34,7 +34,7 @@ void cInterfaceAGL::Swap() // Show the current FPS void cInterfaceAGL::UpdateFPSDisplay(const char *text) { - [[GLWin.cocoaWin window] setTitle: [NSString stringWithUTF8String: text]]; + } // Create rendering window. @@ -80,11 +80,7 @@ bool cInterfaceAGL::Create(void *&window_handle) return NULL; } - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen) { - CGDisplayCapture(CGMainDisplayID()); - [GLWin.cocoaWin setLevel: CGShieldingWindowLevel()]; - } - + [[GLWin.cocoaWin window] makeFirstResponder:GLWin.cocoaWin]; [GLWin.cocoaCtx setView: GLWin.cocoaWin]; [[GLWin.cocoaWin window] makeKeyAndOrderFront: nil]; @@ -115,4 +111,16 @@ void cInterfaceAGL::Shutdown() [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]; +} + diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.h b/Source/Core/DolphinWX/Src/GLInterface/AGL.h index e03256ab4e..e2ea6ba96b 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.h +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.h @@ -31,7 +31,9 @@ public: void UpdateFPSDisplay(const char *Text); bool Create(void *&window_handle); bool MakeCurrent(); - void Shutdown(); + void Shutdown(); + void Update(); + }; #endif