kernelbase: Let GetModuleBaseName succeed on 64bit modules in wow64.
[wine.git] / dlls / dinput / mouse.c
blob502ee797716a7d5593269968541a5b3ab84df7f5
1 /* DirectInput Mouse device
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998,1999 Lionel Ulmer
5 * Copyright 2000-2001 TransGaming Technologies Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include <stdarg.h>
23 #include <string.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winternl.h"
29 #include "winuser.h"
30 #include "winerror.h"
31 #include "winreg.h"
32 #include "dinput.h"
34 #include "dinput_private.h"
35 #include "device_private.h"
36 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(dinput);
40 /* Wine mouse driver object instances */
41 #define WINE_MOUSE_X_AXIS_INSTANCE 0
42 #define WINE_MOUSE_Y_AXIS_INSTANCE 1
43 #define WINE_MOUSE_Z_AXIS_INSTANCE 2
44 #define WINE_MOUSE_BUTTONS_INSTANCE 3
46 static const struct dinput_device_vtbl mouse_vtbl;
48 typedef enum
50 WARP_DEFAULT,
51 WARP_DISABLE,
52 WARP_FORCE_ON
53 } WARP_MOUSE;
55 struct mouse
57 struct dinput_device base;
59 /* These are used in case of relative -> absolute transitions */
60 POINT org_coords;
61 BOOL clipped;
62 /* warping: whether we need to move mouse back to middle once we
63 * reach window borders (for e.g. shooters, "surface movement" games) */
64 BOOL need_warp;
65 DWORD last_warped;
67 WARP_MOUSE warp_override;
70 static inline struct mouse *impl_from_IDirectInputDevice8W( IDirectInputDevice8W *iface )
72 return CONTAINING_RECORD( CONTAINING_RECORD( iface, struct dinput_device, IDirectInputDevice8W_iface ), struct mouse, base );
75 HRESULT mouse_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance, DWORD version )
77 DWORD size;
79 TRACE( "type %#lx, flags %#lx, instance %p, version %#lx\n", type, flags, instance, version );
81 size = instance->dwSize;
82 memset( instance, 0, size );
83 instance->dwSize = size;
84 instance->guidInstance = GUID_SysMouse;
85 instance->guidProduct = GUID_SysMouse;
86 if (version >= 0x0800) instance->dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8);
87 else instance->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8);
88 MultiByteToWideChar( CP_ACP, 0, "Mouse", -1, instance->tszInstanceName, MAX_PATH );
89 MultiByteToWideChar( CP_ACP, 0, "Wine Mouse", -1, instance->tszProductName, MAX_PATH );
91 return DI_OK;
94 static BOOL CALLBACK init_object_properties( const DIDEVICEOBJECTINSTANCEW *instance, void *data )
96 struct mouse *impl = (struct mouse *)data;
97 struct object_properties *properties = impl->base.object_properties + instance->dwOfs / sizeof(LONG);
99 properties->range_min = DIPROPRANGE_NOMIN;
100 properties->range_max = DIPROPRANGE_NOMAX;
102 /* The z-axis (wheel) has a different granularity */
103 if (instance->dwOfs == DIMOFS_Z)
104 properties->granularity = WHEEL_DELTA;
105 else
106 properties->granularity = 1;
108 return DIENUM_CONTINUE;
111 HRESULT mouse_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out )
113 struct mouse *impl;
114 HKEY hkey, appkey;
115 WCHAR buffer[20];
117 TRACE( "dinput %p, guid %s, out %p\n", dinput, debugstr_guid( guid ), out );
119 *out = NULL;
120 if (!IsEqualGUID( &GUID_SysMouse, guid )) return DIERR_DEVICENOTREG;
122 if (!(impl = calloc( 1, sizeof(*impl) ))) return E_OUTOFMEMORY;
123 dinput_device_init( &impl->base, &mouse_vtbl, guid, dinput );
124 impl->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": struct mouse*->base.crit");
126 mouse_enum_device( 0, 0, &impl->base.instance, dinput->dwVersion );
127 impl->base.caps.dwDevType = impl->base.instance.dwDevType;
128 impl->base.caps.dwFirmwareRevision = 100;
129 impl->base.caps.dwHardwareRevision = 100;
130 impl->base.dwCoopLevel = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND;
132 /* One object_properties per axis */
133 impl->base.object_properties = calloc( 3, sizeof(struct object_properties) );
134 if (!impl->base.object_properties)
136 IDirectInputDevice_Release( &impl->base.IDirectInputDevice8W_iface );
137 return E_OUTOFMEMORY;
139 IDirectInputDevice8_EnumObjects( &impl->base.IDirectInputDevice8W_iface, init_object_properties, impl, DIDFT_RELAXIS );
141 get_app_key(&hkey, &appkey);
142 if (!get_config_key( hkey, appkey, L"MouseWarpOverride", buffer, sizeof(buffer) ))
144 if (!wcsnicmp( buffer, L"disable", -1 )) impl->warp_override = WARP_DISABLE;
145 else if (!wcsnicmp( buffer, L"force", -1 )) impl->warp_override = WARP_FORCE_ON;
147 if (appkey) RegCloseKey(appkey);
148 if (hkey) RegCloseKey(hkey);
150 if (dinput->dwVersion >= 0x0800)
151 impl->base.use_raw_input = TRUE;
153 *out = &impl->base.IDirectInputDevice8W_iface;
154 return DI_OK;
157 void dinput_mouse_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam, RAWINPUT *ri )
159 struct mouse *impl = impl_from_IDirectInputDevice8W( iface );
160 DIMOUSESTATE2 *state = (DIMOUSESTATE2 *)impl->base.device_state;
161 POINT rel, pt;
162 DWORD seq;
163 int i, wdata = 0;
164 BOOL notify = FALSE;
166 static const USHORT mouse_button_flags[] =
168 RI_MOUSE_BUTTON_1_DOWN, RI_MOUSE_BUTTON_1_UP,
169 RI_MOUSE_BUTTON_2_DOWN, RI_MOUSE_BUTTON_2_UP,
170 RI_MOUSE_BUTTON_3_DOWN, RI_MOUSE_BUTTON_3_UP,
171 RI_MOUSE_BUTTON_4_DOWN, RI_MOUSE_BUTTON_4_UP,
172 RI_MOUSE_BUTTON_5_DOWN, RI_MOUSE_BUTTON_5_UP
175 TRACE( "iface %p, wparam %#Ix, lparam %#Ix, ri %p.\n", iface, wparam, lparam, ri );
177 if (ri->data.mouse.usFlags & MOUSE_VIRTUAL_DESKTOP)
178 FIXME( "Unimplemented MOUSE_VIRTUAL_DESKTOP flag\n" );
179 if (ri->data.mouse.usFlags & MOUSE_ATTRIBUTES_CHANGED)
180 FIXME( "Unimplemented MOUSE_ATTRIBUTES_CHANGED flag\n" );
182 EnterCriticalSection( &impl->base.crit );
183 seq = impl->base.dinput->evsequence++;
185 rel.x = ri->data.mouse.lLastX;
186 rel.y = ri->data.mouse.lLastY;
187 if (ri->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE)
189 GetCursorPos( &pt );
190 rel.x -= pt.x;
191 rel.y -= pt.y;
194 state->lX += rel.x;
195 state->lY += rel.y;
197 if (impl->base.user_format.dwFlags & DIDF_ABSAXIS)
199 pt.x = state->lX;
200 pt.y = state->lY;
202 else
204 pt = rel;
207 if (rel.x)
209 queue_event( iface, DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS,
210 pt.x, GetCurrentTime(), seq );
211 notify = TRUE;
214 if (rel.y)
216 queue_event( iface, DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS,
217 pt.y, GetCurrentTime(), seq );
218 notify = TRUE;
221 if (rel.x || rel.y)
223 if ((impl->warp_override == WARP_FORCE_ON) ||
224 (impl->warp_override != WARP_DISABLE && (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)))
225 impl->need_warp = TRUE;
228 if (ri->data.mouse.usButtonFlags & RI_MOUSE_WHEEL)
230 state->lZ += (wdata = (SHORT)ri->data.mouse.usButtonData);
231 queue_event( iface, DIDFT_MAKEINSTANCE(WINE_MOUSE_Z_AXIS_INSTANCE) | DIDFT_RELAXIS,
232 wdata, GetCurrentTime(), seq );
233 notify = TRUE;
236 for (i = 0; i < ARRAY_SIZE(mouse_button_flags); ++i)
238 if (ri->data.mouse.usButtonFlags & mouse_button_flags[i])
240 state->rgbButtons[i / 2] = 0x80 - (i % 2) * 0x80;
241 queue_event( iface, DIDFT_MAKEINSTANCE( WINE_MOUSE_BUTTONS_INSTANCE + (i / 2) ) | DIDFT_PSHBUTTON,
242 state->rgbButtons[i / 2], GetCurrentTime(), seq );
243 notify = TRUE;
247 TRACE( "buttons %02x %02x %02x %02x %02x, x %+ld, y %+ld, w %+ld\n", state->rgbButtons[0],
248 state->rgbButtons[1], state->rgbButtons[2], state->rgbButtons[3], state->rgbButtons[4],
249 state->lX, state->lY, state->lZ );
251 if (notify && impl->base.hEvent) SetEvent( impl->base.hEvent );
252 LeaveCriticalSection( &impl->base.crit );
255 int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam )
257 MSLLHOOKSTRUCT *hook = (MSLLHOOKSTRUCT *)lparam;
258 struct mouse *impl = impl_from_IDirectInputDevice8W( iface );
259 DIMOUSESTATE2 *state = (DIMOUSESTATE2 *)impl->base.device_state;
260 int wdata = 0, inst_id = -1, ret = 0;
261 BOOL notify = FALSE;
263 TRACE( "iface %p, msg %#Ix, x %+ld, y %+ld\n", iface, wparam, hook->pt.x, hook->pt.y );
265 EnterCriticalSection( &impl->base.crit );
267 switch(wparam) {
268 case WM_MOUSEMOVE:
270 POINT pt, pt1;
272 GetCursorPos(&pt);
273 state->lX += pt.x = hook->pt.x - pt.x;
274 state->lY += pt.y = hook->pt.y - pt.y;
276 if (impl->base.user_format.dwFlags & DIDF_ABSAXIS)
278 pt1.x = state->lX;
279 pt1.y = state->lY;
280 } else
281 pt1 = pt;
283 if (pt.x)
285 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS;
286 wdata = pt1.x;
288 if (pt.y)
290 /* Already have X, need to queue it */
291 if (inst_id != -1)
293 queue_event( iface, inst_id, wdata, GetCurrentTime(), impl->base.dinput->evsequence );
294 notify = TRUE;
296 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS;
297 wdata = pt1.y;
300 if (pt.x || pt.y)
302 if ((impl->warp_override == WARP_FORCE_ON) ||
303 (impl->warp_override != WARP_DISABLE && (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)))
304 impl->need_warp = TRUE;
306 break;
308 case WM_MOUSEWHEEL:
309 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_Z_AXIS_INSTANCE) | DIDFT_RELAXIS;
310 state->lZ += wdata = (short)HIWORD( hook->mouseData );
311 /* FarCry crashes if it gets a mouse wheel message */
312 /* FIXME: should probably filter out other messages too */
313 ret = impl->clipped;
314 break;
315 case WM_LBUTTONDOWN:
316 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 0) | DIDFT_PSHBUTTON;
317 state->rgbButtons[0] = wdata = 0x80;
318 break;
319 case WM_LBUTTONUP:
320 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 0) | DIDFT_PSHBUTTON;
321 state->rgbButtons[0] = wdata = 0x00;
322 break;
323 case WM_RBUTTONDOWN:
324 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 1) | DIDFT_PSHBUTTON;
325 state->rgbButtons[1] = wdata = 0x80;
326 break;
327 case WM_RBUTTONUP:
328 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 1) | DIDFT_PSHBUTTON;
329 state->rgbButtons[1] = wdata = 0x00;
330 break;
331 case WM_MBUTTONDOWN:
332 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2) | DIDFT_PSHBUTTON;
333 state->rgbButtons[2] = wdata = 0x80;
334 break;
335 case WM_MBUTTONUP:
336 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2) | DIDFT_PSHBUTTON;
337 state->rgbButtons[2] = wdata = 0x00;
338 break;
339 case WM_XBUTTONDOWN:
340 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2 + HIWORD(hook->mouseData)) | DIDFT_PSHBUTTON;
341 state->rgbButtons[2 + HIWORD( hook->mouseData )] = wdata = 0x80;
342 break;
343 case WM_XBUTTONUP:
344 inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_BUTTONS_INSTANCE + 2 + HIWORD(hook->mouseData)) | DIDFT_PSHBUTTON;
345 state->rgbButtons[2 + HIWORD( hook->mouseData )] = wdata = 0x00;
346 break;
350 if (inst_id != -1)
352 queue_event( iface, inst_id, wdata, GetCurrentTime(), impl->base.dinput->evsequence++ );
353 notify = TRUE;
356 TRACE( "buttons %02x %02x %02x %02x %02x, x %+ld, y %+ld, w %+ld\n", state->rgbButtons[0],
357 state->rgbButtons[1], state->rgbButtons[2], state->rgbButtons[3], state->rgbButtons[4],
358 state->lX, state->lY, state->lZ );
360 if (notify && impl->base.hEvent) SetEvent( impl->base.hEvent );
361 LeaveCriticalSection( &impl->base.crit );
362 return ret;
365 static void warp_check( struct mouse *impl, BOOL force )
367 DWORD now = GetCurrentTime();
368 const DWORD interval = impl->clipped ? 500 : 10;
370 if (force || (impl->need_warp && (now - impl->last_warped > interval)))
372 RECT rect, new_rect;
373 POINT mapped_center;
375 impl->last_warped = now;
376 impl->need_warp = FALSE;
377 if (!GetClientRect( impl->base.win, &rect )) return;
378 MapWindowPoints( impl->base.win, 0, (POINT *)&rect, 2 );
379 if (!impl->clipped)
381 mapped_center.x = (rect.left + rect.right) / 2;
382 mapped_center.y = (rect.top + rect.bottom) / 2;
383 TRACE( "Warping mouse to x %+ld, y %+ld.\n", mapped_center.x, mapped_center.y );
384 SetCursorPos( mapped_center.x, mapped_center.y );
386 if (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)
388 /* make sure we clip even if the window covers the whole screen */
389 rect.left = max( rect.left, GetSystemMetrics( SM_XVIRTUALSCREEN ) + 1 );
390 rect.top = max( rect.top, GetSystemMetrics( SM_YVIRTUALSCREEN ) + 1 );
391 rect.right = min( rect.right, rect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ) - 2 );
392 rect.bottom = min( rect.bottom, rect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ) - 2 );
393 TRACE("Clipping mouse to %s\n", wine_dbgstr_rect( &rect ));
394 ClipCursor( &rect );
395 impl->clipped = GetClipCursor( &new_rect ) && EqualRect( &rect, &new_rect );
400 static HRESULT mouse_poll( IDirectInputDevice8W *iface )
402 struct mouse *impl = impl_from_IDirectInputDevice8W( iface );
403 check_dinput_events();
404 warp_check( impl, FALSE );
405 return DI_OK;
408 static HRESULT mouse_acquire( IDirectInputDevice8W *iface )
410 struct mouse *impl = impl_from_IDirectInputDevice8W( iface );
411 DIMOUSESTATE2 *state = (DIMOUSESTATE2 *)impl->base.device_state;
412 POINT point;
414 GetCursorPos( &point );
415 if (impl->base.user_format.dwFlags & DIDF_ABSAXIS)
417 state->lX = point.x;
418 state->lY = point.y;
420 else
422 state->lX = 0;
423 state->lY = 0;
424 impl->org_coords = point;
426 state->lZ = 0;
427 state->rgbButtons[0] = GetKeyState( VK_LBUTTON ) & 0x80;
428 state->rgbButtons[1] = GetKeyState( VK_RBUTTON ) & 0x80;
429 state->rgbButtons[2] = GetKeyState( VK_MBUTTON ) & 0x80;
431 if (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)
433 ShowCursor( FALSE );
434 warp_check( impl, TRUE );
436 else if (impl->warp_override == WARP_FORCE_ON)
438 /* Need a window to warp mouse in. */
439 if (!impl->base.win) impl->base.win = GetDesktopWindow();
440 warp_check( impl, TRUE );
442 else if (impl->clipped)
444 ClipCursor( NULL );
445 impl->clipped = FALSE;
448 return DI_OK;
451 static HRESULT mouse_unacquire( IDirectInputDevice8W *iface )
453 struct mouse *impl = impl_from_IDirectInputDevice8W( iface );
455 if (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)
457 ClipCursor( NULL );
458 ShowCursor( TRUE );
459 impl->clipped = FALSE;
462 /* And put the mouse cursor back where it was at acquire time */
463 if (impl->base.dwCoopLevel & DISCL_EXCLUSIVE || impl->warp_override == WARP_FORCE_ON)
465 TRACE( "warping mouse back to %s\n", wine_dbgstr_point( &impl->org_coords ) );
466 SetCursorPos( impl->org_coords.x, impl->org_coords.y );
469 return DI_OK;
472 static BOOL try_enum_object( const DIPROPHEADER *filter, DWORD flags, LPDIENUMDEVICEOBJECTSCALLBACKW callback,
473 DIDEVICEOBJECTINSTANCEW *instance, void *data )
475 if (flags != DIDFT_ALL && !(flags & DIDFT_GETTYPE( instance->dwType ))) return DIENUM_CONTINUE;
477 switch (filter->dwHow)
479 case DIPH_DEVICE:
480 return callback( instance, data );
481 case DIPH_BYOFFSET:
482 if (filter->dwObj != instance->dwOfs) return DIENUM_CONTINUE;
483 return callback( instance, data );
484 case DIPH_BYID:
485 if ((filter->dwObj & 0x00ffffff) != (instance->dwType & 0x00ffffff)) return DIENUM_CONTINUE;
486 return callback( instance, data );
489 return DIENUM_CONTINUE;
492 static HRESULT mouse_enum_objects( IDirectInputDevice8W *iface, const DIPROPHEADER *filter,
493 DWORD flags, LPDIENUMDEVICEOBJECTSCALLBACKW callback, void *context )
495 DIDEVICEOBJECTINSTANCEW instances[] =
498 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
499 .guidType = GUID_XAxis,
500 .dwOfs = DIMOFS_X,
501 .dwType = DIDFT_RELAXIS|DIDFT_MAKEINSTANCE(0),
502 .dwFlags = DIDOI_ASPECTPOSITION,
503 .tszName = L"X-axis",
506 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
507 .guidType = GUID_YAxis,
508 .dwOfs = DIMOFS_Y,
509 .dwType = DIDFT_RELAXIS|DIDFT_MAKEINSTANCE(1),
510 .dwFlags = DIDOI_ASPECTPOSITION,
511 .tszName = L"Y-axis",
514 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
515 .guidType = GUID_ZAxis,
516 .dwOfs = DIMOFS_Z,
517 .dwType = DIDFT_RELAXIS|DIDFT_MAKEINSTANCE(2),
518 .dwFlags = DIDOI_ASPECTPOSITION,
519 .tszName = L"Wheel",
522 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
523 .guidType = GUID_Button,
524 .dwOfs = DIMOFS_BUTTON0,
525 .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(3),
526 .tszName = L"Button 0",
529 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
530 .guidType = GUID_Button,
531 .dwOfs = DIMOFS_BUTTON1,
532 .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(4),
533 .tszName = L"Button 1",
536 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
537 .guidType = GUID_Button,
538 .dwOfs = DIMOFS_BUTTON2,
539 .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(5),
540 .tszName = L"Button 2",
543 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
544 .guidType = GUID_Button,
545 .dwOfs = DIMOFS_BUTTON3,
546 .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(6),
547 .tszName = L"Button 3",
550 .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
551 .guidType = GUID_Button,
552 .dwOfs = DIMOFS_BUTTON4,
553 .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(7),
554 .tszName = L"Button 4",
557 BOOL ret;
558 DWORD i;
560 for (i = 0; i < ARRAY_SIZE(instances); ++i)
562 ret = try_enum_object( filter, flags, callback, instances + i, context );
563 if (ret != DIENUM_CONTINUE) return DIENUM_STOP;
566 return DIENUM_CONTINUE;
569 static const struct dinput_device_vtbl mouse_vtbl =
571 NULL,
572 mouse_poll,
573 NULL,
574 mouse_acquire,
575 mouse_unacquire,
576 mouse_enum_objects,
577 NULL,
578 NULL,
579 NULL,
580 NULL,
581 NULL,
582 NULL,