From 357c0adc3c89d4eff44e30419ee09914b136df97 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 14 Sep 2014 01:06:25 -0400 Subject: [PATCH] Kill off the wx casts within InputCommon and GLInterface. All because someone didn't actually return the wxWindow handle for the edge case. --- Source/Core/DolphinWX/Frame.h | 8 +++----- Source/Core/DolphinWX/GLInterface/AGL.cpp | 5 +---- .../InputCommon/ControllerInterface/OSX/OSXKeyboard.mm | 3 +-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 8a53df5783..3ddcaa510b 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -87,12 +87,10 @@ public: void* GetRenderHandle() { - #ifdef _WIN32 - return (void *)m_RenderParent->GetHandle(); - #elif defined(HAVE_X11) && HAVE_X11 - return (void *)X11Utils::XWindowFromHandle(m_RenderParent->GetHandle()); + #if defined(HAVE_X11) && HAVE_X11 + return reinterpret_cast(X11Utils::XWindowFromHandle(m_RenderParent->GetHandle())); #else - return m_RenderParent; + return reinterpret_cast(m_RenderParent->GetHandle()); #endif } diff --git a/Source/Core/DolphinWX/GLInterface/AGL.cpp b/Source/Core/DolphinWX/GLInterface/AGL.cpp index c79732159d..59a2cac692 100644 --- a/Source/Core/DolphinWX/GLInterface/AGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/AGL.cpp @@ -2,8 +2,6 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include - #include "DolphinWX/GLInterface/AGL.h" #include "VideoCommon/RenderBase.h" @@ -19,8 +17,7 @@ void cInterfaceAGL::Swap() // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize() bool cInterfaceAGL::Create(void *window_handle) { - // FIXME: Get rid of the explicit use of wxPanel here. This shouldn't be necessary. - cocoaWin = reinterpret_cast(((wxPanel*)window_handle)->GetHandle()); + cocoaWin = reinterpret_cast(window_handle); NSSize size = [cocoaWin frame].size; // Enable high-resolution display support. diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.mm index 7ff67c0e7f..1294346e1b 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.mm @@ -7,7 +7,6 @@ #include #include #include -#include // wxWidgets #include "InputCommon/ControllerInterface/OSX/OSXKeyboard.h" @@ -45,7 +44,7 @@ Keyboard::Keyboard(IOHIDDeviceRef device, std::string name, int index, void *win CFRelease(elements); } - m_windowid = [[(NSView *)(((wxWindow *)window)->GetHandle()) window] windowNumber]; + m_windowid = [[reinterpret_cast(window) window] windowNumber]; // cursor, with a hax for-loop for (unsigned int i=0; i<4; ++i)