From 3adc2cef685b798dc4aee308b450c686456fe03a Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 22 Apr 2010 11:54:46 +0000 Subject: Build fix for wiimote new in linux. Don't expect functionality, this just gets it building again. The config dialog segfaults when you open it. I will fix that soon, and add mouse functionality. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5397 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../InputPluginCommon/Src/ControllerEmu.cpp | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Source/Plugins/InputPluginCommon/Src/ControllerEmu.cpp') diff --git a/Source/Plugins/InputPluginCommon/Src/ControllerEmu.cpp b/Source/Plugins/InputPluginCommon/Src/ControllerEmu.cpp index 8d4fad8813..70aa0998cb 100644 --- a/Source/Plugins/InputPluginCommon/Src/ControllerEmu.cpp +++ b/Source/Plugins/InputPluginCommon/Src/ControllerEmu.cpp @@ -1,5 +1,9 @@ #include "ControllerEmu.h" +#if defined(HAVE_X11) && HAVE_X11 +#include +#endif + const char modifier[] = "Modifier"; @@ -321,20 +325,16 @@ void GetMousePos(float& x, float& y, const SWiimoteInitialize* const wiimote_ini int x, y; } point = { 1, 1 }; - // i think this if can be taken out, the plugin will handle that - if (IsFocus()) - { - Display* const wm_display = (Display*)wiimote_initialize->hWnd; - Window glwin = *(Window *)wiimote_initialize->pXWindow; - - XWindowAttributes win_attribs; - XGetWindowAttributes (wm_display, glwin, &win_attribs); - win_width = win_attribs.width; - win_height = win_attribs.height; - Window root_dummy, child_win; - unsigned int mask; - XQueryPointer(wm_display, glwin, &root_dummy, &child_win, &root_x, &root_y, &point.x, &point.y, &mask); - } + Display* const wm_display = (Display*)wiimote_initialize->hWnd; + Window glwin = *(Window *)wiimote_initialize->pXWindow; + + XWindowAttributes win_attribs; + XGetWindowAttributes (wm_display, glwin, &win_attribs); + win_width = win_attribs.width; + win_height = win_attribs.height; + Window root_dummy, child_win; + unsigned int mask; + XQueryPointer(wm_display, glwin, &root_dummy, &child_win, &root_x, &root_y, &point.x, &point.y, &mask); #endif #if ( defined(_WIN32) || (defined(HAVE_X11) && HAVE_X11)) -- cgit v1.2.3