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
This commit is contained in:
Glenn Rice 2010-04-22 11:54:46 +00:00
parent 7c22b83f66
commit 3adc2cef68
2 changed files with 17 additions and 13 deletions

View File

@ -8,6 +8,10 @@
#include "PluginSpecs.h"
#include "ExportProlog.h"
#ifndef _WIN32
#include "Config.h"
#endif
typedef void (*TLogv)(const char* _pMessage, int _v);

View File

@ -1,5 +1,9 @@
#include "ControllerEmu.h"
#if defined(HAVE_X11) && HAVE_X11
#include <X11/Xlib.h>
#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;
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);
}
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))