From e63a5d85297b7fc31c89b13c2ba09aa7d2fd4294 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 14 Mar 2013 09:52:13 +0100 Subject: [PATCH] remove wx from agl --- Source/Core/DolphinWX/Src/Frame.h | 2 +- Source/Core/DolphinWX/Src/GLInterface/AGL.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 45a0eb1ad4..7b01590e45 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -107,7 +107,7 @@ public: void* GetRenderHandle() { - #ifdef _WIN32 + #if defined(_WIN32) || defined(__APPLE__) return (void *)m_RenderParent->GetHandle(); #elif defined(HAVE_X11) && HAVE_X11 return (void *)X11Utils::XWindowFromHandle(m_RenderParent->GetHandle()); diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp index c18800ad9b..c78a9f1448 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp @@ -20,8 +20,6 @@ #include "RenderBase.h" #include "ConfigManager.h" -#include - #include "VertexShaderManager.h" #include "../GLInterface.h" #include "AGL.h" @@ -74,7 +72,7 @@ bool cInterfaceAGL::Create(void *&window_handle) style |= NSResizableWindowMask | NSTitledWindowMask; } - GLWin.cocoaWin = (NSView*)(((wxPanel*)window_handle)->GetHandle());; + GLWin.cocoaWin = (NSView*)window_handle; if (GLWin.cocoaWin == nil) { ERROR_LOG(VIDEO, "failed to create window"); return NULL; @@ -97,8 +95,6 @@ bool cInterfaceAGL::MakeCurrent() 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];