summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorBraden <Bradenb95@gmail.com>2013-03-18 17:15:59 -0500
committerBraden <Bradenb95@gmail.com>2013-03-18 17:15:59 -0500
commita2af6494cfd47d424d7c26967ab12f15d2e6e2de (patch)
treea23c5dbbb942f2d394486d259db0d17fd863f34c /Source/Core
parent7d74293170b01ac17431be7c80e118e8d4e3f668 (diff)
Clean up CInterfaceAGL, make sure the screen gets cleared on stop, and remove the FPS update that messes up GUI builds since GUIless doesn't build anyways.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Src/GLInterface/AGL.cpp31
-rw-r--r--Source/Core/DolphinWX/Src/GLInterface/AGL.h1
2 files changed, 3 insertions, 29 deletions
diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
index a703d849b9..2fa042daef 100644
--- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
+++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
@@ -31,12 +31,6 @@ void cInterfaceAGL::Swap()
[GLWin.cocoaCtx flushBuffer];
}
-// Show the current FPS
-void cInterfaceAGL::UpdateFPSDisplay(const char *text)
-{
-
-}
-
// Create rendering window.
// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
bool cInterfaceAGL::Create(void *&window_handle)
@@ -48,8 +42,6 @@ bool cInterfaceAGL::Create(void *&window_handle)
s_backbuffer_width = _twidth;
s_backbuffer_height = _theight;
- NSRect size;
- NSUInteger style = NSMiniaturizableWindowMask;
NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 };
NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
initWithAttributes: attr];
@@ -66,14 +58,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
return NULL;
}
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen) {
- size = [[NSScreen mainScreen] frame];
- style |= NSBorderlessWindowMask;
- } else {
- size = NSMakeRect(_tx, _ty, _twidth, _theight);
- style |= NSResizableWindowMask | NSTitledWindowMask;
- }
-
+
GLWin.cocoaWin = (NSView*)(((wxPanel*)window_handle)->GetHandle());;
if (GLWin.cocoaWin == nil) {
ERROR_LOG(VIDEO, "failed to create window");
@@ -89,19 +74,8 @@ bool cInterfaceAGL::Create(void *&window_handle)
bool cInterfaceAGL::MakeCurrent()
{
- int width, height;
-
- width = [GLWin.cocoaWin frame].size.width;
- height = [GLWin.cocoaWin frame].size.height;
- //if (width == s_backbuffer_width && height == s_backbuffer_height)
- // return true;
-
- [GLWin.cocoaCtx setView: GLWin.cocoaWin];
- [GLWin.cocoaCtx update];
[GLWin.cocoaCtx makeCurrentContext];
- s_backbuffer_width = width;
- s_backbuffer_height = height;
- return true;
+ return true;
}
// Close backend
@@ -109,6 +83,7 @@ void cInterfaceAGL::Shutdown()
{
[GLWin.cocoaCtx clearDrawable];
[GLWin.cocoaCtx release];
+ GLWin.cocoaCtx = nil;
}
void cInterfaceAGL::Update()
diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.h b/Source/Core/DolphinWX/Src/GLInterface/AGL.h
index e2ea6ba96b..ea4ed66778 100644
--- a/Source/Core/DolphinWX/Src/GLInterface/AGL.h
+++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.h
@@ -28,7 +28,6 @@ class cInterfaceAGL : public cInterfaceBase
{
public:
void Swap();
- void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);
bool MakeCurrent();
void Shutdown();