Skip to content

Commit

Permalink
Fix full screen on OSX, well as fixed as its ever been. Apperently in…
Browse files Browse the repository at this point in the history
… render to main it always shown the FPS on the bottom in full screen.
  • Loading branch information
bzb95 committed Mar 18, 2013
1 parent 8faefa3 commit ae3c5a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 14 additions & 6 deletions Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
Expand Up @@ -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.
Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -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];
}


4 changes: 3 additions & 1 deletion Source/Core/DolphinWX/Src/GLInterface/AGL.h
Expand Up @@ -31,7 +31,9 @@ class cInterfaceAGL : public cInterfaceBase
void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);
bool MakeCurrent();
void Shutdown();
void Shutdown();
void Update();

};
#endif

0 comments on commit ae3c5a6

Please sign in to comment.