mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
This is basicall linux code cleanup. We don not need to pass the X display handle from the video plugin anymore. The wiimote plugins now open their own display handles, and the GUI uses the display handle of the main window frame. Only the window handle from the video plugin is needed. The pWindowHandle variable now passes this instead of the display handle.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5884 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -230,7 +230,7 @@ void GetMousePos(float& x, float& y)
|
||||
int root_x, root_y, win_x, win_y;
|
||||
if (IsFocus())
|
||||
{
|
||||
Window GLWin = *(Window *)g_WiimoteInitialize.pXWindow;
|
||||
Window GLWin = (Window)g_WiimoteInitialize.hWnd;
|
||||
XWindowAttributes WinAttribs;
|
||||
XGetWindowAttributes (WMdisplay, GLWin, &WinAttribs);
|
||||
WinWidth = (float)WinAttribs.width;
|
||||
|
@ -358,7 +358,7 @@ bool IsKey(int Key)
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
if (Key == EWM_SHAKE || Key == EWM_A || Key == EWM_B)
|
||||
{
|
||||
Window GLWin = *(Window *)g_WiimoteInitialize.pXWindow;
|
||||
Window GLWin = (Window)g_WiimoteInitialize.hWnd;
|
||||
int root_x, root_y, win_x, win_y;
|
||||
Window rootDummy, childWin;
|
||||
unsigned int mask;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
Display* WMdisplay;
|
||||
Display* WMdisplay = NULL;
|
||||
#endif
|
||||
SWiimoteInitialize g_WiimoteInitialize;
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
@ -208,7 +208,7 @@ void Initialize(void *init)
|
||||
g_Config.Load();
|
||||
#endif
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
WMdisplay = (Display*)g_WiimoteInitialize.hWnd;
|
||||
WMdisplay = XOpenDisplay(NULL);
|
||||
#endif
|
||||
|
||||
g_ISOId = g_WiimoteInitialize.ISOId;
|
||||
@ -254,6 +254,11 @@ void Shutdown(void)
|
||||
WiiMoteReal::Shutdown();
|
||||
#endif
|
||||
WiiMoteEmu::Shutdown();
|
||||
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
if (WMdisplay)
|
||||
XCloseDisplay(WMdisplay);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user