From deffc957948dd86306a6845c24db42fca7d71288 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 16 Jul 2010 03:43:11 +0000 Subject: New Wiimote Plugin: Moved Linux cursor position code into ControllerInterface/Xlib. (absolute cursor position can be mapped to something other than IR camera) (code fixed by Glennrics) Put the UDP Wiimote dialog's Update Buttons,Update IR,Update Nunchuk... checkboxes in an "Update" group box. Fixed some Linux config dialog problems. (thanks Glennrics again) Some other minor cleanup in ControllerInterface. (changed some std::string/stringstream to char[] where possible) Removed a warning in DX11 plugin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5880 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/InputCommon/Src/ControllerEmu.cpp | 33 --------------------------- 1 file changed, 33 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerEmu.cpp b/Source/Core/InputCommon/Src/ControllerEmu.cpp index 78b597f3a5..e57ffc2d0b 100644 --- a/Source/Core/InputCommon/Src/ControllerEmu.cpp +++ b/Source/Core/InputCommon/Src/ControllerEmu.cpp @@ -319,36 +319,3 @@ void ControllerEmu::LoadDefaults(const ControllerInterface &ciface) UpdateDefaultDevice(); } } - -// TODO: remove this hackery -void GetMousePos(float& x, float& y, const SWiimoteInitialize* const wiimote_initialize) -{ -#if defined(HAVE_X11) && HAVE_X11 - - unsigned int win_width = 2, win_height = 2; - int root_x, root_y; - struct - { - int x, y; - } point = { 1, 1 }; - - 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); - - // Return the mouse position as a range from -1 to 1 - x = (float)point.x / (float)win_width * 2 - 1; - y = (float)point.y / (float)win_height * 2 - 1; -#else - - x = 0; - y = 0; -#endif -} -- cgit v1.2.3