2000-11-05 21:25:02 +01:00
|
|
|
/* DirectInput Mouse device
|
|
|
|
*
|
|
|
|
* Copyright 1998 Marcus Meissner
|
|
|
|
* Copyright 1998,1999 Lionel Ulmer
|
2002-06-14 02:39:44 +02:00
|
|
|
* Copyright 2000-2001 TransGaming Technologies Inc.
|
2000-11-05 21:25:02 +01:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-11-05 21:25:02 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
2002-07-22 23:53:32 +02:00
|
|
|
#include "wine/port.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-11-05 21:25:02 +01:00
|
|
|
#include <string.h>
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
2000-11-05 21:25:02 +01:00
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
2001-10-18 23:30:46 +02:00
|
|
|
#include "winerror.h"
|
2008-08-19 03:18:29 +02:00
|
|
|
#include "winreg.h"
|
2000-11-05 21:25:02 +01:00
|
|
|
#include "dinput.h"
|
|
|
|
|
|
|
|
#include "dinput_private.h"
|
|
|
|
#include "device_private.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2003-06-16 22:22:13 +02:00
|
|
|
#include "wine/unicode.h"
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
2000-11-05 21:25:02 +01:00
|
|
|
|
|
|
|
/* Wine mouse driver object instances */
|
2004-06-02 02:36:54 +02:00
|
|
|
#define WINE_MOUSE_X_AXIS_INSTANCE 0
|
|
|
|
#define WINE_MOUSE_Y_AXIS_INSTANCE 1
|
2007-01-06 01:14:55 +01:00
|
|
|
#define WINE_MOUSE_Z_AXIS_INSTANCE 2
|
|
|
|
#define WINE_MOUSE_BUTTONS_INSTANCE 3
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IDirectInputDevice8AVtbl SysMouseAvt;
|
|
|
|
static const IDirectInputDevice8WVtbl SysMouseWvt;
|
2003-06-16 22:22:13 +02:00
|
|
|
|
|
|
|
typedef struct SysMouseImpl SysMouseImpl;
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2008-08-19 03:18:29 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
WARP_DEFAULT,
|
|
|
|
WARP_DISABLE,
|
|
|
|
WARP_FORCE_ON
|
|
|
|
} WARP_MOUSE;
|
|
|
|
|
2003-06-16 22:22:13 +02:00
|
|
|
struct SysMouseImpl
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-03 15:25:07 +01:00
|
|
|
struct IDirectInputDeviceImpl base;
|
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
/* SysMouseAImpl */
|
|
|
|
/* These are used in case of relative -> absolute transitions */
|
|
|
|
POINT org_coords;
|
2011-04-26 14:41:51 +02:00
|
|
|
BOOL clipped;
|
2004-06-02 02:36:54 +02:00
|
|
|
/* warping: whether we need to move mouse back to middle once we
|
|
|
|
* reach window borders (for e.g. shooters, "surface movement" games) */
|
2006-12-20 09:03:11 +01:00
|
|
|
BOOL need_warp;
|
2006-06-22 15:30:52 +02:00
|
|
|
DWORD last_warped;
|
2006-12-20 09:03:11 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
/* This is for mouse reporting. */
|
2006-12-12 16:58:51 +01:00
|
|
|
DIMOUSESTATE2 m_state;
|
2008-08-19 03:18:29 +02:00
|
|
|
|
|
|
|
WARP_MOUSE warp_override;
|
2000-11-05 21:25:02 +01:00
|
|
|
};
|
|
|
|
|
2011-01-09 23:43:26 +01:00
|
|
|
static inline SysMouseImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface)
|
|
|
|
{
|
2011-01-09 23:44:19 +01:00
|
|
|
return CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8A_iface), SysMouseImpl, base);
|
2011-01-09 23:43:26 +01:00
|
|
|
}
|
|
|
|
static inline SysMouseImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W *iface)
|
|
|
|
{
|
2011-01-09 23:44:19 +01:00
|
|
|
return CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface), SysMouseImpl, base);
|
2011-01-09 23:43:26 +01:00
|
|
|
}
|
2014-11-21 20:58:55 +01:00
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl *This)
|
|
|
|
{
|
2011-01-09 23:44:19 +01:00
|
|
|
return &This->base.IDirectInputDevice8W_iface;
|
2011-01-09 23:44:02 +01:00
|
|
|
}
|
2011-01-09 23:43:26 +01:00
|
|
|
|
2009-02-21 20:54:37 +01:00
|
|
|
static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam );
|
2003-06-07 02:36:51 +02:00
|
|
|
|
2007-07-07 07:36:22 +02:00
|
|
|
const GUID DInput_Wine_Mouse_GUID = { /* 9e573ed8-7734-11d2-8d4a-23903fb6bdf7 */
|
|
|
|
0x9e573ed8, 0x7734, 0x11d2, {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7}
|
2000-11-05 21:25:02 +01:00
|
|
|
};
|
|
|
|
|
2010-08-30 22:19:22 +02:00
|
|
|
static void _dump_mouse_state(const DIMOUSESTATE2 *m_state)
|
2007-09-10 07:14:23 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (!TRACE_ON(dinput)) return;
|
|
|
|
|
|
|
|
TRACE("(X: %d Y: %d Z: %d", m_state->lX, m_state->lY, m_state->lZ);
|
|
|
|
for (i = 0; i < 5; i++) TRACE(" B%d: %02x", i, m_state->rgbButtons[i]);
|
|
|
|
TRACE(")\n");
|
|
|
|
}
|
|
|
|
|
2005-05-16 10:44:14 +02:00
|
|
|
static void fill_mouse_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version) {
|
2003-06-07 02:36:51 +02:00
|
|
|
DWORD dwSize;
|
|
|
|
DIDEVICEINSTANCEA ddi;
|
|
|
|
|
|
|
|
dwSize = lpddi->dwSize;
|
|
|
|
|
2006-10-08 01:55:40 +02:00
|
|
|
TRACE("%d %p\n", dwSize, lpddi);
|
2003-06-07 02:36:51 +02:00
|
|
|
|
|
|
|
memset(lpddi, 0, dwSize);
|
|
|
|
memset(&ddi, 0, sizeof(ddi));
|
|
|
|
|
|
|
|
ddi.dwSize = dwSize;
|
|
|
|
ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */
|
|
|
|
ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */
|
2005-05-16 10:44:14 +02:00
|
|
|
if (version >= 0x0800)
|
2003-06-13 20:55:41 +02:00
|
|
|
ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8);
|
|
|
|
else
|
|
|
|
ddi.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8);
|
2003-06-07 02:36:51 +02:00
|
|
|
strcpy(ddi.tszInstanceName, "Mouse");
|
|
|
|
strcpy(ddi.tszProductName, "Wine Mouse");
|
|
|
|
|
|
|
|
memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
|
|
|
|
}
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2005-05-16 10:44:14 +02:00
|
|
|
static void fill_mouse_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version) {
|
2003-06-16 22:22:13 +02:00
|
|
|
DWORD dwSize;
|
|
|
|
DIDEVICEINSTANCEW ddi;
|
|
|
|
|
|
|
|
dwSize = lpddi->dwSize;
|
|
|
|
|
2006-10-08 01:55:40 +02:00
|
|
|
TRACE("%d %p\n", dwSize, lpddi);
|
2003-06-16 22:22:13 +02:00
|
|
|
|
|
|
|
memset(lpddi, 0, dwSize);
|
|
|
|
memset(&ddi, 0, sizeof(ddi));
|
|
|
|
|
|
|
|
ddi.dwSize = dwSize;
|
|
|
|
ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */
|
|
|
|
ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */
|
2005-05-16 10:44:14 +02:00
|
|
|
if (version >= 0x0800)
|
2003-06-16 22:22:13 +02:00
|
|
|
ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8);
|
|
|
|
else
|
|
|
|
ddi.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8);
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, "Mouse", -1, ddi.tszInstanceName, MAX_PATH);
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, "Wine Mouse", -1, ddi.tszProductName, MAX_PATH);
|
|
|
|
|
|
|
|
memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
|
|
|
|
}
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
static HRESULT mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
|
2003-06-16 22:22:13 +02:00
|
|
|
{
|
2004-09-13 21:16:47 +02:00
|
|
|
if (id != 0)
|
2013-05-20 21:10:02 +02:00
|
|
|
return E_FAIL;
|
2004-09-13 21:16:47 +02:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
if ((dwDevType == 0) ||
|
2005-05-16 10:44:14 +02:00
|
|
|
((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) ||
|
|
|
|
(((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 0x0800))) {
|
2004-06-02 02:36:54 +02:00
|
|
|
TRACE("Enumerating the mouse device\n");
|
|
|
|
|
|
|
|
fill_mouse_dideviceinstanceA(lpddi, version);
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
return S_OK;
|
2004-06-02 02:36:54 +02:00
|
|
|
}
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
return S_FALSE;
|
2003-06-16 22:22:13 +02:00
|
|
|
}
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
static HRESULT mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2004-09-13 21:16:47 +02:00
|
|
|
if (id != 0)
|
2013-05-20 21:10:02 +02:00
|
|
|
return E_FAIL;
|
2004-09-13 21:16:47 +02:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
if ((dwDevType == 0) ||
|
2005-05-16 10:44:14 +02:00
|
|
|
((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) ||
|
|
|
|
(((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 0x0800))) {
|
2004-06-02 02:36:54 +02:00
|
|
|
TRACE("Enumerating the mouse device\n");
|
|
|
|
|
|
|
|
fill_mouse_dideviceinstanceW(lpddi, version);
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
return S_OK;
|
2004-06-02 02:36:54 +02:00
|
|
|
}
|
|
|
|
|
2013-05-20 21:10:02 +02:00
|
|
|
return S_FALSE;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:19 +01:00
|
|
|
static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2003-06-16 22:22:13 +02:00
|
|
|
SysMouseImpl* newDevice;
|
2006-12-28 00:31:31 +01:00
|
|
|
LPDIDATAFORMAT df = NULL;
|
2007-11-01 18:05:39 +01:00
|
|
|
unsigned i;
|
2008-08-19 03:18:29 +02:00
|
|
|
char buffer[20];
|
|
|
|
HKEY hkey, appkey;
|
2006-12-12 16:57:54 +01:00
|
|
|
|
2003-06-16 22:22:13 +02:00
|
|
|
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysMouseImpl));
|
2006-12-12 16:57:54 +01:00
|
|
|
if (!newDevice) return NULL;
|
2011-01-09 23:44:19 +01:00
|
|
|
newDevice->base.IDirectInputDevice8A_iface.lpVtbl = &SysMouseAvt;
|
|
|
|
newDevice->base.IDirectInputDevice8W_iface.lpVtbl = &SysMouseWvt;
|
2006-10-15 19:29:30 +02:00
|
|
|
newDevice->base.ref = 1;
|
2006-10-15 19:30:07 +02:00
|
|
|
newDevice->base.dwCoopLevel = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND;
|
2008-02-29 23:06:34 +01:00
|
|
|
newDevice->base.guid = *rguid;
|
2006-12-01 18:56:00 +01:00
|
|
|
InitializeCriticalSection(&newDevice->base.crit);
|
2007-03-08 16:32:50 +01:00
|
|
|
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysMouseImpl*->base.crit");
|
2007-06-27 14:58:08 +02:00
|
|
|
newDevice->base.dinput = dinput;
|
2007-07-07 07:36:30 +02:00
|
|
|
newDevice->base.event_proc = dinput_mouse_hook;
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2008-08-19 03:18:29 +02:00
|
|
|
get_app_key(&hkey, &appkey);
|
|
|
|
if (!get_config_key(hkey, appkey, "MouseWarpOverride", buffer, sizeof(buffer)))
|
|
|
|
{
|
|
|
|
if (!strcasecmp(buffer, "disable"))
|
|
|
|
newDevice->warp_override = WARP_DISABLE;
|
|
|
|
else if (!strcasecmp(buffer, "force"))
|
|
|
|
newDevice->warp_override = WARP_FORCE_ON;
|
|
|
|
}
|
|
|
|
if (appkey) RegCloseKey(appkey);
|
|
|
|
if (hkey) RegCloseKey(hkey);
|
|
|
|
|
2006-12-28 00:31:31 +01:00
|
|
|
/* Create copy of default data format */
|
|
|
|
if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIMouse2.dwSize))) goto failed;
|
|
|
|
memcpy(df, &c_dfDIMouse2, c_dfDIMouse2.dwSize);
|
|
|
|
if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed;
|
|
|
|
memcpy(df->rgodf, c_dfDIMouse2.rgodf, df->dwNumObjs * df->dwObjSize);
|
|
|
|
|
|
|
|
/* Because we don't do any detection yet just modify instance and type */
|
|
|
|
for (i = 0; i < df->dwNumObjs; i++)
|
|
|
|
if (DIDFT_GETTYPE(df->rgodf[i].dwType) & DIDFT_AXIS)
|
|
|
|
df->rgodf[i].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_RELAXIS;
|
|
|
|
else
|
|
|
|
df->rgodf[i].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON;
|
|
|
|
|
|
|
|
newDevice->base.data_format.wine_df = df;
|
2011-01-09 23:43:09 +01:00
|
|
|
IDirectInput_AddRef(&newDevice->base.dinput->IDirectInput7A_iface);
|
2011-01-19 05:06:37 +01:00
|
|
|
|
|
|
|
EnterCriticalSection(&dinput->crit);
|
|
|
|
list_add_tail(&dinput->devices_list, &newDevice->base.entry);
|
|
|
|
LeaveCriticalSection(&dinput->crit);
|
|
|
|
|
2006-12-28 00:32:36 +01:00
|
|
|
return newDevice;
|
2006-12-12 16:57:54 +01:00
|
|
|
|
2006-12-28 00:31:31 +01:00
|
|
|
failed:
|
|
|
|
if (df) HeapFree(GetProcessHeap(), 0, df->rgodf);
|
|
|
|
HeapFree(GetProcessHeap(), 0, df);
|
2006-12-22 18:54:29 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, newDevice);
|
2006-12-12 16:57:54 +01:00
|
|
|
return NULL;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-23 20:44:20 +01:00
|
|
|
static HRESULT mousedev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPVOID *pdev, int unicode)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-23 20:44:20 +01:00
|
|
|
TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode);
|
|
|
|
*pdev = NULL;
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2011-01-23 20:44:20 +01:00
|
|
|
if (IsEqualGUID(&GUID_SysMouse, rguid) || /* Generic Mouse */
|
|
|
|
IsEqualGUID(&DInput_Wine_Mouse_GUID, rguid)) /* Wine Mouse */
|
|
|
|
{
|
|
|
|
SysMouseImpl *This;
|
|
|
|
|
|
|
|
if (riid == NULL)
|
|
|
|
;/* nothing */
|
|
|
|
else if (IsEqualGUID(&IID_IDirectInputDeviceA, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice2A, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice7A, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice8A, riid))
|
|
|
|
{
|
|
|
|
unicode = 0;
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(&IID_IDirectInputDeviceW, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice2W, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice7W, riid) ||
|
|
|
|
IsEqualGUID(&IID_IDirectInputDevice8W, riid))
|
|
|
|
{
|
|
|
|
unicode = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WARN("no interface\n");
|
|
|
|
return DIERR_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
This = alloc_device(rguid, dinput);
|
|
|
|
TRACE("Created a Mouse device (%p)\n", This);
|
|
|
|
|
|
|
|
if (!This) return DIERR_OUTOFMEMORY;
|
|
|
|
|
|
|
|
if (unicode)
|
|
|
|
*pdev = &This->base.IDirectInputDevice8W_iface;
|
|
|
|
else
|
|
|
|
*pdev = &This->base.IDirectInputDevice8A_iface;
|
|
|
|
|
|
|
|
return DI_OK;
|
2004-06-02 02:36:54 +02:00
|
|
|
}
|
2011-01-23 20:44:20 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
return DIERR_DEVICENOTREG;
|
2003-06-16 22:22:13 +02:00
|
|
|
}
|
2005-03-15 20:36:15 +01:00
|
|
|
|
|
|
|
const struct dinput_device mouse_device = {
|
2004-06-04 20:06:37 +02:00
|
|
|
"Wine mouse driver",
|
2004-06-02 02:36:54 +02:00
|
|
|
mousedev_enum_deviceA,
|
|
|
|
mousedev_enum_deviceW,
|
2011-01-23 20:44:20 +01:00
|
|
|
mousedev_create_device
|
2000-11-05 21:25:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* SysMouseA (DInput Mouse support)
|
|
|
|
*/
|
|
|
|
|
2001-10-18 23:30:46 +02:00
|
|
|
/* low-level mouse hook */
|
2009-02-21 20:54:37 +01:00
|
|
|
static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam )
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2001-10-18 23:30:46 +02:00
|
|
|
MSLLHOOKSTRUCT *hook = (MSLLHOOKSTRUCT *)lparam;
|
2011-01-09 23:43:26 +01:00
|
|
|
SysMouseImpl* This = impl_from_IDirectInputDevice8A(iface);
|
2012-02-15 19:13:34 +01:00
|
|
|
int wdata = 0, inst_id = -1, ret = 0;
|
2001-10-18 23:30:46 +02:00
|
|
|
|
2007-09-10 07:14:23 +02:00
|
|
|
TRACE("msg %lx @ (%d %d)\n", wparam, hook->pt.x, hook->pt.y);
|
|
|
|
|
2006-12-01 18:56:00 +01:00
|
|
|
EnterCriticalSection(&This->base.crit);
|
2002-06-14 02:39:44 +02:00
|
|
|
|
2006-12-20 09:03:11 +01:00
|
|
|
switch(wparam) {
|
|
|
|
case WM_MOUSEMOVE:
|
|
|
|
{
|
|
|
|
POINT pt, pt1;
|
|
|
|
|
2012-01-19 13:34:55 +01:00
|
|
|
GetCursorPos(&pt);
|
2006-12-20 09:03:11 +01:00
|
|
|
This->m_state.lX += pt.x = hook->pt.x - pt.x;
|
|
|
|
This->m_state.lY += pt.y = hook->pt.y - pt.y;
|
|
|
|
|
|
|
|
if (This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS)
|
|
|
|
{
|
|
|
|
pt1.x = This->m_state.lX;
|
|
|
|
pt1.y = This->m_state.lY;
|
|
|
|
} else
|
|
|
|
pt1 = pt;
|
|
|
|
|
|
|
|
if (pt.x)
|
2007-08-17 07:51:32 +02:00
|
|
|
{
|
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS;
|
|
|
|
wdata = pt1.x;
|
|
|
|
}
|
2006-12-20 09:03:11 +01:00
|
|
|
if (pt.y)
|
2007-01-06 01:14:55 +01:00
|
|
|
{
|
2007-08-17 07:51:32 +02:00
|
|
|
/* Already have X, need to queue it */
|
|
|
|
if (inst_id != -1)
|
2011-01-09 23:43:17 +01:00
|
|
|
queue_event(iface, inst_id,
|
2008-02-14 08:18:51 +01:00
|
|
|
wdata, GetCurrentTime(), This->base.dinput->evsequence);
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS;
|
|
|
|
wdata = pt1.y;
|
|
|
|
}
|
2006-12-20 09:03:11 +01:00
|
|
|
|
2011-04-26 12:54:39 +02:00
|
|
|
if (pt.x || pt.y)
|
|
|
|
{
|
|
|
|
if ((This->warp_override == WARP_FORCE_ON) ||
|
|
|
|
(This->warp_override != WARP_DISABLE && (This->base.dwCoopLevel & DISCL_EXCLUSIVE)))
|
|
|
|
This->need_warp = TRUE;
|
|
|
|
}
|
2006-12-20 09:03:11 +01:00
|
|
|
break;
|
|
|
|
}
|
2007-01-06 01:14:55 +01:00
|
|
|
case WM_MOUSEWHEEL:
|
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_Z_AXIS_INSTANCE) | DIDFT_RELAXIS;
|
|
|
|
This->m_state.lZ += wdata = (short)HIWORD(hook->mouseData);
|
2012-02-15 19:13:34 +01:00
|
|
|
/* FarCry crashes if it gets a mouse wheel message */
|
|
|
|
/* FIXME: should probably filter out other messages too */
|
|
|
|
ret = This->clipped;
|
2007-01-06 01:14:55 +01:00
|
|
|
break;
|
2004-06-02 02:36:54 +02:00
|
|
|
case WM_LBUTTONDOWN:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 0) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[0] = wdata = 0x80;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
|
|
|
case WM_LBUTTONUP:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 0) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[0] = wdata = 0x00;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
|
|
|
case WM_RBUTTONDOWN:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 1) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[1] = wdata = 0x80;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
|
|
|
case WM_RBUTTONUP:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 1) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[1] = wdata = 0x00;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
|
|
|
case WM_MBUTTONDOWN:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[2] = wdata = 0x80;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
|
|
|
case WM_MBUTTONUP:
|
2007-01-06 01:14:55 +01:00
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[2] = wdata = 0x00;
|
2004-06-02 02:36:54 +02:00
|
|
|
break;
|
2007-01-06 01:14:55 +01:00
|
|
|
case WM_XBUTTONDOWN:
|
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2 + HIWORD(hook->mouseData)) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[2 + HIWORD(hook->mouseData)] = wdata = 0x80;
|
|
|
|
break;
|
|
|
|
case WM_XBUTTONUP:
|
|
|
|
inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2 + HIWORD(hook->mouseData)) | DIDFT_PSHBUTTON;
|
|
|
|
This->m_state.rgbButtons[2 + HIWORD(hook->mouseData)] = wdata = 0x00;
|
|
|
|
break;
|
2001-10-18 23:30:46 +02:00
|
|
|
}
|
2006-12-20 09:03:11 +01:00
|
|
|
|
|
|
|
|
2007-01-06 01:14:55 +01:00
|
|
|
if (inst_id != -1)
|
2007-09-10 07:14:23 +02:00
|
|
|
{
|
|
|
|
_dump_mouse_state(&This->m_state);
|
2011-01-09 23:43:17 +01:00
|
|
|
queue_event(iface, inst_id,
|
2008-02-14 08:18:51 +01:00
|
|
|
wdata, GetCurrentTime(), This->base.dinput->evsequence++);
|
2007-09-10 07:14:23 +02:00
|
|
|
}
|
2006-08-07 04:27:40 +02:00
|
|
|
|
2006-12-01 18:56:00 +01:00
|
|
|
LeaveCriticalSection(&This->base.crit);
|
2012-02-15 19:13:34 +01:00
|
|
|
return ret;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-10-16 20:36:48 +02:00
|
|
|
static void warp_check( SysMouseImpl* This, BOOL force )
|
2011-04-26 12:28:25 +02:00
|
|
|
{
|
|
|
|
DWORD now = GetCurrentTime();
|
2011-04-26 14:41:51 +02:00
|
|
|
const DWORD interval = This->clipped ? 500 : 10;
|
2011-04-26 12:28:25 +02:00
|
|
|
|
2011-04-26 12:54:39 +02:00
|
|
|
if (force || (This->need_warp && (now - This->last_warped > interval)))
|
2011-04-26 12:28:25 +02:00
|
|
|
{
|
2012-01-30 17:46:23 +01:00
|
|
|
RECT rect, new_rect;
|
2012-01-19 13:34:55 +01:00
|
|
|
POINT mapped_center;
|
2011-04-26 12:54:39 +02:00
|
|
|
|
2011-04-26 12:28:25 +02:00
|
|
|
This->last_warped = now;
|
|
|
|
This->need_warp = FALSE;
|
2012-02-01 14:33:06 +01:00
|
|
|
if (!GetClientRect(This->base.win, &rect)) return;
|
|
|
|
MapWindowPoints( This->base.win, 0, (POINT *)&rect, 2 );
|
2011-04-26 14:41:51 +02:00
|
|
|
if (!This->clipped)
|
|
|
|
{
|
2012-01-19 13:34:55 +01:00
|
|
|
mapped_center.x = (rect.left + rect.right) / 2;
|
|
|
|
mapped_center.y = (rect.top + rect.bottom) / 2;
|
|
|
|
TRACE("Warping mouse to %d - %d\n", mapped_center.x, mapped_center.y);
|
|
|
|
SetCursorPos( mapped_center.x, mapped_center.y );
|
2011-04-26 14:41:51 +02:00
|
|
|
}
|
2011-04-26 12:54:39 +02:00
|
|
|
if (This->base.dwCoopLevel & DISCL_EXCLUSIVE)
|
|
|
|
{
|
2012-01-19 13:34:55 +01:00
|
|
|
/* make sure we clip even if the window covers the whole screen */
|
|
|
|
rect.left = max( rect.left, GetSystemMetrics( SM_XVIRTUALSCREEN ) + 1 );
|
|
|
|
rect.top = max( rect.top, GetSystemMetrics( SM_YVIRTUALSCREEN ) + 1 );
|
|
|
|
rect.right = min( rect.right, rect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ) - 2 );
|
|
|
|
rect.bottom = min( rect.bottom, rect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ) - 2 );
|
2011-04-26 12:54:39 +02:00
|
|
|
TRACE("Clipping mouse to %s\n", wine_dbgstr_rect( &rect ));
|
2012-01-30 17:46:23 +01:00
|
|
|
ClipCursor( &rect );
|
|
|
|
This->clipped = GetClipCursor( &new_rect ) && EqualRect( &rect, &new_rect );
|
2011-04-26 12:54:39 +02:00
|
|
|
}
|
2011-04-26 12:28:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-06-14 02:39:44 +02:00
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* Acquire : gets exclusive control of the mouse
|
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2005-03-24 16:08:27 +01:00
|
|
|
POINT point;
|
2006-12-01 18:54:42 +01:00
|
|
|
HRESULT res;
|
2011-01-09 23:44:02 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
TRACE("(this=%p)\n",This);
|
2006-12-01 18:54:42 +01:00
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
if ((res = IDirectInputDevice2WImpl_Acquire(iface)) != DI_OK) return res;
|
2005-03-24 16:08:27 +01:00
|
|
|
|
|
|
|
/* Init the mouse state */
|
|
|
|
GetCursorPos( &point );
|
2006-12-18 07:22:34 +01:00
|
|
|
if (This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS)
|
|
|
|
{
|
2005-03-24 16:08:27 +01:00
|
|
|
This->m_state.lX = point.x;
|
|
|
|
This->m_state.lY = point.y;
|
|
|
|
} else {
|
|
|
|
This->m_state.lX = 0;
|
|
|
|
This->m_state.lY = 0;
|
|
|
|
This->org_coords = point;
|
|
|
|
}
|
|
|
|
This->m_state.lZ = 0;
|
2005-05-09 11:24:34 +02:00
|
|
|
This->m_state.rgbButtons[0] = GetKeyState(VK_LBUTTON) & 0x80;
|
|
|
|
This->m_state.rgbButtons[1] = GetKeyState(VK_RBUTTON) & 0x80;
|
|
|
|
This->m_state.rgbButtons[2] = GetKeyState(VK_MBUTTON) & 0x80;
|
2011-04-26 12:54:39 +02:00
|
|
|
|
2006-10-15 19:30:07 +02:00
|
|
|
if (This->base.dwCoopLevel & DISCL_EXCLUSIVE)
|
2007-10-07 18:30:02 +02:00
|
|
|
{
|
2011-04-26 12:54:39 +02:00
|
|
|
ShowCursor(FALSE); /* hide cursor */
|
|
|
|
warp_check( This, TRUE );
|
2007-10-07 18:30:02 +02:00
|
|
|
}
|
2011-04-26 12:54:39 +02:00
|
|
|
else if (This->warp_override == WARP_FORCE_ON)
|
2006-12-18 07:22:34 +01:00
|
|
|
{
|
2011-04-26 12:28:25 +02:00
|
|
|
/* Need a window to warp mouse in. */
|
|
|
|
if (!This->base.win) This->base.win = GetDesktopWindow();
|
|
|
|
warp_check( This, TRUE );
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
2011-05-05 16:31:51 +02:00
|
|
|
else if (This->clipped)
|
|
|
|
{
|
|
|
|
ClipCursor( NULL );
|
|
|
|
This->clipped = FALSE;
|
|
|
|
}
|
2006-12-20 09:03:11 +01:00
|
|
|
|
2005-03-24 16:08:27 +01:00
|
|
|
return DI_OK;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_Acquire(IDirectInputDevice8W_from_impl(This));
|
|
|
|
}
|
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* Unacquire : frees the mouse
|
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2006-12-01 18:54:42 +01:00
|
|
|
HRESULT res;
|
2011-01-09 23:43:26 +01:00
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
TRACE("(this=%p)\n",This);
|
2006-12-01 18:54:42 +01:00
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
if ((res = IDirectInputDevice2WImpl_Unacquire(iface)) != DI_OK) return res;
|
2006-03-18 19:26:37 +01:00
|
|
|
|
2006-10-15 19:30:07 +02:00
|
|
|
if (This->base.dwCoopLevel & DISCL_EXCLUSIVE)
|
2007-10-07 18:30:02 +02:00
|
|
|
{
|
|
|
|
ClipCursor(NULL);
|
2006-03-18 19:26:37 +01:00
|
|
|
ShowCursor(TRUE); /* show cursor */
|
2011-05-05 16:31:51 +02:00
|
|
|
This->clipped = FALSE;
|
2007-10-07 18:30:02 +02:00
|
|
|
}
|
2006-03-18 19:26:37 +01:00
|
|
|
|
2005-03-24 16:08:27 +01:00
|
|
|
/* And put the mouse cursor back where it was at acquire time */
|
2008-08-19 03:18:29 +02:00
|
|
|
if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON)
|
2006-12-18 07:22:34 +01:00
|
|
|
{
|
2012-03-26 16:10:42 +02:00
|
|
|
TRACE("warping mouse back to %s\n", wine_dbgstr_point(&This->org_coords));
|
|
|
|
SetCursorPos(This->org_coords.x, This->org_coords.y);
|
2004-06-02 02:36:54 +02:00
|
|
|
}
|
2011-01-09 23:44:02 +01:00
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
return DI_OK;
|
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_Unacquire(IDirectInputDevice8W_from_impl(This));
|
|
|
|
}
|
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* GetDeviceState : returns the "state" of the mouse.
|
|
|
|
*
|
|
|
|
* For the moment, only the "standard" return structure (DIMOUSESTATE) is
|
|
|
|
* supported.
|
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface, DWORD len, LPVOID ptr)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2015-11-05 15:57:19 +01:00
|
|
|
TRACE("(%p)->(%u,%p)\n", This, len, ptr);
|
2005-05-04 11:46:07 +02:00
|
|
|
|
2006-12-01 18:54:42 +01:00
|
|
|
if(This->base.acquired == 0) return DIERR_NOTACQUIRED;
|
2005-05-04 11:46:07 +02:00
|
|
|
|
2015-11-05 15:57:29 +01:00
|
|
|
check_dinput_events();
|
|
|
|
|
2015-11-05 15:57:19 +01:00
|
|
|
EnterCriticalSection(&This->base.crit);
|
2007-09-10 07:14:23 +02:00
|
|
|
_dump_mouse_state(&This->m_state);
|
2006-12-28 20:04:10 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
/* Copy the current mouse state */
|
2008-07-27 17:53:34 +02:00
|
|
|
fill_DataFormat(ptr, len, &This->m_state, &This->base.data_format);
|
2006-12-28 20:04:10 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
/* Initialize the buffer when in relative mode */
|
2006-12-18 07:22:34 +01:00
|
|
|
if (!(This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS))
|
|
|
|
{
|
2004-06-02 02:36:54 +02:00
|
|
|
This->m_state.lX = 0;
|
|
|
|
This->m_state.lY = 0;
|
|
|
|
This->m_state.lZ = 0;
|
|
|
|
}
|
2006-12-28 20:04:10 +01:00
|
|
|
LeaveCriticalSection(&This->base.crit);
|
2006-12-20 09:03:11 +01:00
|
|
|
|
2011-10-16 20:36:48 +02:00
|
|
|
warp_check( This, FALSE );
|
|
|
|
return DI_OK;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetDeviceState(LPDIRECTINPUTDEVICE8A iface, DWORD len, LPVOID ptr)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_GetDeviceState(IDirectInputDevice8W_from_impl(This), len, ptr);
|
|
|
|
}
|
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
2005-05-05 12:30:24 +02:00
|
|
|
* GetDeviceData : gets buffered input data.
|
2000-11-05 21:25:02 +01:00
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetDeviceData(LPDIRECTINPUTDEVICE8W iface,
|
2006-12-04 18:54:40 +01:00
|
|
|
DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags)
|
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2006-12-04 18:54:40 +01:00
|
|
|
HRESULT res;
|
2005-05-05 12:30:24 +02:00
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
res = IDirectInputDevice2WImpl_GetDeviceData(iface, dodsize, dod, entries, flags);
|
2011-10-16 20:36:48 +02:00
|
|
|
if (SUCCEEDED(res)) warp_check( This, FALSE );
|
2006-12-04 18:54:40 +01:00
|
|
|
return res;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|
|
|
DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_GetDeviceData(IDirectInputDevice8W_from_impl(This), dodsize, dod, entries, flags);
|
|
|
|
}
|
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* GetProperty : get input device properties
|
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPDIPROPHEADER pdiph)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2011-01-09 23:43:26 +01:00
|
|
|
|
2006-12-04 18:54:40 +01:00
|
|
|
TRACE("(%p) %s,%p\n", This, debugstr_guid(rguid), pdiph);
|
|
|
|
_dump_DIPROPHEADER(pdiph);
|
2011-01-09 23:43:26 +01:00
|
|
|
|
2010-02-02 00:11:49 +01:00
|
|
|
if (IS_DIPROP(rguid)) {
|
2005-09-12 12:30:05 +02:00
|
|
|
switch (LOWORD(rguid)) {
|
2009-01-05 12:39:44 +01:00
|
|
|
case (DWORD_PTR) DIPROP_GRANULARITY: {
|
2004-06-02 02:36:54 +02:00
|
|
|
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
|
|
|
|
|
2018-03-06 20:03:41 +01:00
|
|
|
if (
|
|
|
|
((pdiph->dwHow == DIPH_BYOFFSET) &&
|
|
|
|
((pdiph->dwObj == DIMOFS_X) ||
|
|
|
|
(pdiph->dwObj == DIMOFS_Y)))
|
|
|
|
||
|
|
|
|
((pdiph->dwHow == DIPH_BYID) &&
|
|
|
|
((pdiph->dwObj == (DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS)) ||
|
|
|
|
(pdiph->dwObj == (DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS))))
|
|
|
|
){
|
|
|
|
/* Set granularity of X/Y Axis to 1. See MSDN on DIPROP_GRANULARITY */
|
|
|
|
pr->dwData = 1;
|
|
|
|
} else {
|
|
|
|
/* We'll just assume that the app asks about the Z axis */
|
|
|
|
pr->dwData = WHEEL_DELTA;
|
|
|
|
}
|
2004-06-02 02:36:54 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-01-05 12:39:44 +01:00
|
|
|
case (DWORD_PTR) DIPROP_RANGE: {
|
2004-06-02 02:36:54 +02:00
|
|
|
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
|
|
|
|
|
|
|
|
if ((pdiph->dwHow == DIPH_BYID) &&
|
|
|
|
((pdiph->dwObj == (DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS)) ||
|
|
|
|
(pdiph->dwObj == (DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS)))) {
|
|
|
|
/* Querying the range of either the X or the Y axis. As I do
|
|
|
|
not know the range, do as if the range were
|
|
|
|
unrestricted...*/
|
|
|
|
pr->lMin = DIPROPRANGE_NOMIN;
|
|
|
|
pr->lMax = DIPROPRANGE_NOMAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2006-12-04 18:54:40 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
default:
|
2011-01-09 23:44:02 +01:00
|
|
|
return IDirectInputDevice2WImpl_GetProperty(iface, rguid, pdiph);
|
2006-12-04 18:54:40 +01:00
|
|
|
}
|
|
|
|
}
|
2011-01-09 23:44:02 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
return DI_OK;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_GetProperty(IDirectInputDevice8W_from_impl(This), rguid, pdiph);
|
|
|
|
}
|
|
|
|
|
2000-11-05 21:25:02 +01:00
|
|
|
/******************************************************************************
|
2008-03-27 18:57:17 +01:00
|
|
|
* GetCapabilities : get the device capabilities
|
2000-11-05 21:25:02 +01:00
|
|
|
*/
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps)
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2004-12-13 14:17:03 +01:00
|
|
|
DIDEVCAPS devcaps;
|
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
TRACE("(this=%p,%p)\n",This,lpDIDevCaps);
|
2004-12-13 14:17:03 +01:00
|
|
|
|
|
|
|
if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) {
|
2004-09-21 22:04:37 +02:00
|
|
|
WARN("invalid parameter\n");
|
|
|
|
return DIERR_INVALIDPARAM;
|
2004-06-02 02:36:54 +02:00
|
|
|
}
|
2004-12-13 14:17:03 +01:00
|
|
|
|
|
|
|
devcaps.dwSize = lpDIDevCaps->dwSize;
|
2011-10-30 21:52:45 +01:00
|
|
|
devcaps.dwFlags = DIDC_ATTACHED | DIDC_EMULATED;
|
2007-06-27 14:58:08 +02:00
|
|
|
if (This->base.dinput->dwVersion >= 0x0800)
|
2004-12-13 14:17:03 +01:00
|
|
|
devcaps.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8);
|
|
|
|
else
|
|
|
|
devcaps.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8);
|
|
|
|
devcaps.dwAxes = 3;
|
2006-12-28 00:32:36 +01:00
|
|
|
devcaps.dwButtons = 8;
|
2004-12-13 14:17:03 +01:00
|
|
|
devcaps.dwPOVs = 0;
|
|
|
|
devcaps.dwFFSamplePeriod = 0;
|
|
|
|
devcaps.dwFFMinTimeResolution = 0;
|
|
|
|
devcaps.dwFirmwareRevision = 100;
|
|
|
|
devcaps.dwHardwareRevision = 100;
|
|
|
|
devcaps.dwFFDriverVersion = 0;
|
|
|
|
|
|
|
|
memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize);
|
2011-01-09 23:44:02 +01:00
|
|
|
|
2004-06-02 02:36:54 +02:00
|
|
|
return DI_OK;
|
2000-11-05 21:25:02 +01:00
|
|
|
}
|
|
|
|
|
2011-01-09 23:44:02 +01:00
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetCapabilities(LPDIRECTINPUTDEVICE8A iface, LPDIDEVCAPS lpDIDevCaps)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
return SysMouseWImpl_GetCapabilities(IDirectInputDevice8W_from_impl(This), lpDIDevCaps);
|
|
|
|
}
|
|
|
|
|
2007-01-04 07:04:39 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* GetObjectInfo : get information about a device object such as a button
|
|
|
|
* or axis
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
|
|
|
LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow)
|
|
|
|
{
|
|
|
|
static const WCHAR x_axisW[] = {'X','-','A','x','i','s',0};
|
2007-01-04 18:15:39 +01:00
|
|
|
static const WCHAR y_axisW[] = {'Y','-','A','x','i','s',0};
|
2007-01-04 07:04:39 +01:00
|
|
|
static const WCHAR wheelW[] = {'W','h','e','e','l',0};
|
|
|
|
static const WCHAR buttonW[] = {'B','u','t','t','o','n',' ','%','d',0};
|
|
|
|
HRESULT res;
|
|
|
|
|
|
|
|
res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
|
|
|
|
if (res != DI_OK) return res;
|
|
|
|
|
|
|
|
if (IsEqualGUID(&pdidoi->guidType, &GUID_XAxis)) strcpyW(pdidoi->tszName, x_axisW);
|
|
|
|
else if (IsEqualGUID(&pdidoi->guidType, &GUID_YAxis)) strcpyW(pdidoi->tszName, y_axisW);
|
|
|
|
else if (IsEqualGUID(&pdidoi->guidType, &GUID_ZAxis)) strcpyW(pdidoi->tszName, wheelW);
|
|
|
|
else if (pdidoi->dwType & DIDFT_BUTTON)
|
|
|
|
wsprintfW(pdidoi->tszName, buttonW, DIDFT_GETINSTANCE(pdidoi->dwType) - 3);
|
|
|
|
|
|
|
|
_dump_OBJECTINSTANCEW(pdidoi);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface,
|
|
|
|
LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow)
|
|
|
|
{
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
2007-01-04 07:04:39 +01:00
|
|
|
HRESULT res;
|
|
|
|
DIDEVICEOBJECTINSTANCEW didoiW;
|
|
|
|
DWORD dwSize = pdidoi->dwSize;
|
|
|
|
|
|
|
|
didoiW.dwSize = sizeof(didoiW);
|
2011-01-09 23:44:02 +01:00
|
|
|
res = SysMouseWImpl_GetObjectInfo(IDirectInputDevice8W_from_impl(This), &didoiW, dwObj, dwHow);
|
2007-01-04 07:04:39 +01:00
|
|
|
if (res != DI_OK) return res;
|
|
|
|
|
|
|
|
memset(pdidoi, 0, pdidoi->dwSize);
|
|
|
|
memcpy(pdidoi, &didoiW, FIELD_OFFSET(DIDEVICEOBJECTINSTANCEW, tszName));
|
|
|
|
pdidoi->dwSize = dwSize;
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, didoiW.tszName, -1, pdidoi->tszName,
|
|
|
|
sizeof(pdidoi->tszName), NULL, NULL);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2003-06-07 02:36:51 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* GetDeviceInfo : get information about a device's identity
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI SysMouseAImpl_GetDeviceInfo(
|
|
|
|
LPDIRECTINPUTDEVICE8A iface,
|
|
|
|
LPDIDEVICEINSTANCEA pdidi)
|
|
|
|
{
|
2011-01-09 23:43:26 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
2003-06-07 02:36:51 +02:00
|
|
|
TRACE("(this=%p,%p)\n", This, pdidi);
|
|
|
|
|
|
|
|
if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEA)) {
|
2011-07-30 12:03:08 +02:00
|
|
|
WARN(" dinput3 not supported yet...\n");
|
2003-06-07 02:36:51 +02:00
|
|
|
return DI_OK;
|
|
|
|
}
|
|
|
|
|
2007-06-27 14:58:08 +02:00
|
|
|
fill_mouse_dideviceinstanceA(pdidi, This->base.dinput->dwVersion);
|
2003-06-07 02:36:51 +02:00
|
|
|
|
|
|
|
return DI_OK;
|
|
|
|
}
|
2000-11-05 21:25:02 +01:00
|
|
|
|
2003-06-16 22:22:13 +02:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi)
|
|
|
|
{
|
2011-01-09 23:43:26 +01:00
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
|
2003-06-16 22:22:13 +02:00
|
|
|
TRACE("(this=%p,%p)\n", This, pdidi);
|
|
|
|
|
|
|
|
if (pdidi->dwSize != sizeof(DIDEVICEINSTANCEW)) {
|
2011-07-30 12:03:08 +02:00
|
|
|
WARN(" dinput3 not supported yet...\n");
|
2003-06-16 22:22:13 +02:00
|
|
|
return DI_OK;
|
|
|
|
}
|
|
|
|
|
2007-06-27 14:58:08 +02:00
|
|
|
fill_mouse_dideviceinstanceW(pdidi, This->base.dinput->dwVersion);
|
2003-06-16 22:22:13 +02:00
|
|
|
|
|
|
|
return DI_OK;
|
|
|
|
}
|
|
|
|
|
2011-07-02 06:06:37 +02:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
|
|
|
|
LPDIACTIONFORMATW lpdiaf,
|
|
|
|
LPCWSTR lpszUserName,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
2011-08-24 04:42:49 +02:00
|
|
|
FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
2011-07-02 06:06:37 +02:00
|
|
|
|
2011-08-24 04:42:49 +02:00
|
|
|
return _build_action_map(iface, lpdiaf, lpszUserName, dwFlags, DIMOUSE_MASK, &c_dfDIMouse2);
|
2011-07-02 06:06:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI SysMouseAImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
|
|
|
|
LPDIACTIONFORMATA lpdiaf,
|
|
|
|
LPCSTR lpszUserName,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
DIACTIONFORMATW diafW;
|
|
|
|
HRESULT hr;
|
2011-08-24 04:42:53 +02:00
|
|
|
WCHAR *lpszUserNameW = NULL;
|
|
|
|
int username_size;
|
2011-07-02 06:06:37 +02:00
|
|
|
|
|
|
|
diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiaf->dwNumActions);
|
|
|
|
_copy_diactionformatAtoW(&diafW, lpdiaf);
|
|
|
|
|
2011-08-24 04:42:53 +02:00
|
|
|
if (lpszUserName != NULL)
|
|
|
|
{
|
|
|
|
username_size = MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, NULL, 0);
|
|
|
|
lpszUserNameW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*username_size);
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, lpszUserNameW, username_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = SysMouseWImpl_BuildActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
|
2011-07-02 06:06:37 +02:00
|
|
|
|
|
|
|
_copy_diactionformatWtoA(lpdiaf, &diafW);
|
|
|
|
HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
|
2011-08-24 04:42:53 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
|
2011-07-02 06:06:37 +02:00
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
2003-06-16 22:22:13 +02:00
|
|
|
|
2011-07-02 06:06:54 +02:00
|
|
|
static HRESULT WINAPI SysMouseWImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface,
|
|
|
|
LPDIACTIONFORMATW lpdiaf,
|
|
|
|
LPCWSTR lpszUserName,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
2011-08-24 04:42:50 +02:00
|
|
|
FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
2011-07-02 06:06:54 +02:00
|
|
|
|
2011-08-24 04:42:50 +02:00
|
|
|
return _set_action_map(iface, lpdiaf, lpszUserName, dwFlags, &c_dfDIMouse2);
|
2011-07-02 06:06:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
|
|
|
|
LPDIACTIONFORMATA lpdiaf,
|
|
|
|
LPCSTR lpszUserName,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
SysMouseImpl *This = impl_from_IDirectInputDevice8A(iface);
|
|
|
|
DIACTIONFORMATW diafW;
|
|
|
|
HRESULT hr;
|
2011-08-24 04:42:53 +02:00
|
|
|
WCHAR *lpszUserNameW = NULL;
|
|
|
|
int username_size;
|
2011-07-02 06:06:54 +02:00
|
|
|
|
|
|
|
diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiaf->dwNumActions);
|
|
|
|
_copy_diactionformatAtoW(&diafW, lpdiaf);
|
|
|
|
|
2011-08-24 04:42:53 +02:00
|
|
|
if (lpszUserName != NULL)
|
|
|
|
{
|
|
|
|
username_size = MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, NULL, 0);
|
|
|
|
lpszUserNameW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*username_size);
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, lpszUserName, -1, lpszUserNameW, username_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = SysMouseWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
|
2011-07-02 06:06:54 +02:00
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
|
2011-08-24 04:42:53 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
|
2011-07-02 06:06:54 +02:00
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IDirectInputDevice8AVtbl SysMouseAvt =
|
2000-11-05 21:25:02 +01:00
|
|
|
{
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice2AImpl_QueryInterface,
|
|
|
|
IDirectInputDevice2AImpl_AddRef,
|
2007-06-27 14:58:27 +02:00
|
|
|
IDirectInputDevice2AImpl_Release,
|
2004-06-02 02:36:54 +02:00
|
|
|
SysMouseAImpl_GetCapabilities,
|
2006-12-28 00:32:36 +01:00
|
|
|
IDirectInputDevice2AImpl_EnumObjects,
|
2004-06-02 02:36:54 +02:00
|
|
|
SysMouseAImpl_GetProperty,
|
2006-12-18 07:22:34 +01:00
|
|
|
IDirectInputDevice2AImpl_SetProperty,
|
2004-06-02 02:36:54 +02:00
|
|
|
SysMouseAImpl_Acquire,
|
|
|
|
SysMouseAImpl_Unacquire,
|
|
|
|
SysMouseAImpl_GetDeviceState,
|
|
|
|
SysMouseAImpl_GetDeviceData,
|
2006-12-12 16:58:29 +01:00
|
|
|
IDirectInputDevice2AImpl_SetDataFormat,
|
2006-10-15 19:29:48 +02:00
|
|
|
IDirectInputDevice2AImpl_SetEventNotification,
|
2006-10-15 19:30:07 +02:00
|
|
|
IDirectInputDevice2AImpl_SetCooperativeLevel,
|
2007-01-04 07:04:39 +01:00
|
|
|
SysMouseAImpl_GetObjectInfo,
|
2004-06-02 02:36:54 +02:00
|
|
|
SysMouseAImpl_GetDeviceInfo,
|
|
|
|
IDirectInputDevice2AImpl_RunControlPanel,
|
|
|
|
IDirectInputDevice2AImpl_Initialize,
|
|
|
|
IDirectInputDevice2AImpl_CreateEffect,
|
|
|
|
IDirectInputDevice2AImpl_EnumEffects,
|
|
|
|
IDirectInputDevice2AImpl_GetEffectInfo,
|
|
|
|
IDirectInputDevice2AImpl_GetForceFeedbackState,
|
|
|
|
IDirectInputDevice2AImpl_SendForceFeedbackCommand,
|
|
|
|
IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
|
|
|
|
IDirectInputDevice2AImpl_Escape,
|
|
|
|
IDirectInputDevice2AImpl_Poll,
|
|
|
|
IDirectInputDevice2AImpl_SendDeviceData,
|
|
|
|
IDirectInputDevice7AImpl_EnumEffectsInFile,
|
|
|
|
IDirectInputDevice7AImpl_WriteEffectToFile,
|
2011-07-02 06:06:37 +02:00
|
|
|
SysMouseAImpl_BuildActionMap,
|
2011-07-02 06:06:54 +02:00
|
|
|
SysMouseAImpl_SetActionMap,
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice8AImpl_GetImageInfo
|
2000-11-05 21:25:02 +01:00
|
|
|
};
|
2003-06-16 22:22:13 +02:00
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IDirectInputDevice8WVtbl SysMouseWvt =
|
2003-06-16 22:22:13 +02:00
|
|
|
{
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice2WImpl_QueryInterface,
|
2011-01-09 23:43:55 +01:00
|
|
|
IDirectInputDevice2WImpl_AddRef,
|
|
|
|
IDirectInputDevice2WImpl_Release,
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseWImpl_GetCapabilities,
|
2006-12-28 00:32:36 +01:00
|
|
|
IDirectInputDevice2WImpl_EnumObjects,
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseWImpl_GetProperty,
|
2011-01-09 23:43:55 +01:00
|
|
|
IDirectInputDevice2WImpl_SetProperty,
|
2011-01-09 23:44:02 +01:00
|
|
|
SysMouseWImpl_Acquire,
|
|
|
|
SysMouseWImpl_Unacquire,
|
|
|
|
SysMouseWImpl_GetDeviceState,
|
|
|
|
SysMouseWImpl_GetDeviceData,
|
2011-01-09 23:43:55 +01:00
|
|
|
IDirectInputDevice2WImpl_SetDataFormat,
|
|
|
|
IDirectInputDevice2WImpl_SetEventNotification,
|
|
|
|
IDirectInputDevice2WImpl_SetCooperativeLevel,
|
2007-01-04 07:04:39 +01:00
|
|
|
SysMouseWImpl_GetObjectInfo,
|
2004-06-02 02:36:54 +02:00
|
|
|
SysMouseWImpl_GetDeviceInfo,
|
2011-01-09 23:43:55 +01:00
|
|
|
IDirectInputDevice2WImpl_RunControlPanel,
|
|
|
|
IDirectInputDevice2WImpl_Initialize,
|
|
|
|
IDirectInputDevice2WImpl_CreateEffect,
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice2WImpl_EnumEffects,
|
|
|
|
IDirectInputDevice2WImpl_GetEffectInfo,
|
2011-01-09 23:43:55 +01:00
|
|
|
IDirectInputDevice2WImpl_GetForceFeedbackState,
|
|
|
|
IDirectInputDevice2WImpl_SendForceFeedbackCommand,
|
|
|
|
IDirectInputDevice2WImpl_EnumCreatedEffectObjects,
|
|
|
|
IDirectInputDevice2WImpl_Escape,
|
|
|
|
IDirectInputDevice2WImpl_Poll,
|
|
|
|
IDirectInputDevice2WImpl_SendDeviceData,
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice7WImpl_EnumEffectsInFile,
|
|
|
|
IDirectInputDevice7WImpl_WriteEffectToFile,
|
2011-07-02 06:06:37 +02:00
|
|
|
SysMouseWImpl_BuildActionMap,
|
2011-07-02 06:06:54 +02:00
|
|
|
SysMouseWImpl_SetActionMap,
|
2004-06-02 02:36:54 +02:00
|
|
|
IDirectInputDevice8WImpl_GetImageInfo
|
2003-06-16 22:22:13 +02:00
|
|
|
};
|