Skip to content

Commit

Permalink
Merge pull request #1080 from lioncash/wx-crap
Browse files Browse the repository at this point in the history
Kill off the wx casts within InputCommon and GLInterface.
  • Loading branch information
lioncash committed Sep 14, 2014
2 parents 4e7f284 + 357c0ad commit b307bb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 3 additions & 5 deletions Source/Core/DolphinWX/Frame.h
Expand Up @@ -87,12 +87,10 @@ class CFrame : public CRenderFrame

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<void*>(X11Utils::XWindowFromHandle(m_RenderParent->GetHandle()));
#else
return m_RenderParent;
return reinterpret_cast<void*>(m_RenderParent->GetHandle());
#endif
}

Expand Down
5 changes: 1 addition & 4 deletions Source/Core/DolphinWX/GLInterface/AGL.cpp
Expand Up @@ -2,8 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <wx/panel.h>

#include "DolphinWX/GLInterface/AGL.h"

#include "VideoCommon/RenderBase.h"
Expand All @@ -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<NSView*>(((wxPanel*)window_handle)->GetHandle());
cocoaWin = reinterpret_cast<NSView*>(window_handle);
NSSize size = [cocoaWin frame].size;

// Enable high-resolution display support.
Expand Down
Expand Up @@ -7,7 +7,6 @@
#include <Foundation/Foundation.h>
#include <IOKit/hid/IOHIDLib.h>
#include <Cocoa/Cocoa.h>
#include <wx/wx.h> // wxWidgets

#include "InputCommon/ControllerInterface/OSX/OSXKeyboard.h"

Expand Down Expand Up @@ -45,7 +44,7 @@
CFRelease(elements);
}

m_windowid = [[(NSView *)(((wxWindow *)window)->GetHandle()) window] windowNumber];
m_windowid = [[reinterpret_cast<NSView*>(window) window] windowNumber];

// cursor, with a hax for-loop
for (unsigned int i=0; i<4; ++i)
Expand Down

0 comments on commit b307bb6

Please sign in to comment.