Commit Graph

188 Commits

Author SHA1 Message Date
Rémi Bernon 5eb5f94fc0 dinput: Factor out IDirectInputDevice_GetCapabilities WtoA conversions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 16:14:03 +02:00
Rémi Bernon 08d07c4cc2 dinput: Factor out IDirectInputDevice_GetObjectInfo WtoA conversions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:37 +02:00
Rémi Bernon 49c66a3a94 dinput/tests: Check IDirectInputDevice2AImpl_GetObjectInfo error codes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:37 +02:00
Rémi Bernon 90ef30828e dinput: Use generic WtoA wrappers when possible.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Rémi Bernon 5fe103107a dinput: Use IDirectInputDevice8W interface consistently.
Instead of sometimes using IDirectInputDevice8A.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Rémi Bernon 81d1c79dcd dinput8: Use rawinput interface for mouse device.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:17 +02:00
Rémi Bernon 306c40e673 dinput: Use dedicated list for mouse and keyboard.
Instead of using function pointer, which is also not very CPU friendly.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Rémi Bernon 26c1131201 dinput: Use a single list for all acquired devices.
Instead of going through devices list of dinputs list, and checking
their acquired field, which is not CPU friendly.

This also removes the now unused IDirectInputImpl critical section and
devices list.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Alistair Leslie-Hughes d61d710121 dinput: Mouse device doesn't support property DIPROP_VIDPID.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 12:48:11 +01:00
Alistair Leslie-Hughes c4debff5db dinput: Improve returned flags in Mouse GetObjectInfo.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:42:22 +02:00
Alistair Leslie-Hughes 52deca4900 dinput: Trace This pointer in a consistent way.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 11:39:52 -05:00
Alistair Leslie-Hughes 381fa00b6a dinput: Support DIDEVICEINSTANCE_DX3 for Mouse GetDeviceInfo.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 07:13:53 -05:00
Alistair Leslie-Hughes b3c5062f36 dinput: Don't report SysMouse/Keyboard devices as supporting Force Feedback.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 21:05:08 +02:00
Piotr Caban e7d1107f32 dinput: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Brendan McGrath 3a2834b3a4 dinput: Use the same GUID for Instance and Product.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:22:36 +01:00
Johann Frei 4bc1e172ec dinput: Implement X/Y axis granularity and add test.
Signed-off-by: Johann Frei <johann_frei@yahoo.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-08 11:27:19 -06:00
Sebastian Lackner bfb845f9fc dinput: Ensure X11 input events are forwarded to wineserver even without message loop.
This commit basically reverts b22ff8018a.

Windows does not do that, but our current implementation of winex11
requires periodic event polling to forward events to the wineserver.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 01:13:58 +09:00
Sebastian Lackner eca5ee9a49 dinput: Print TRACE at the beginning of SysMouseWImpl_GetDeviceState function.
Also move the _dump_mouse_state() call inside of the lock.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 01:13:57 +09:00
André Hentschel c440168e53 dinput: Remove unused functions (Clang). 2014-11-25 19:49:40 +01:00
Andrew Eikum 0ba314ebfa dinput: Enumerate devices past the first non-matching device. 2013-05-21 12:08:01 +02:00
Dmitry Timoshkov 1a61dcc25d dinput: Use standard way for dumping POINT. 2012-03-27 11:38:11 +02:00
Alexandre Julliard 011a3523aa dinput: Filter out mouse wheel messages in exclusive mode. 2012-02-15 19:17:36 +01:00
Alexandre Julliard a1580bba70 dinput: Clip to the client area instead of the whole window in exclusive mode. 2012-02-01 16:42:47 +01:00
Alexandre Julliard b0657c8623 dinput: Catch unsuccessful clipping attempts and fall back to warping. 2012-01-30 20:44:48 +01:00
Alexandre Julliard f6368c4202 dinput: Clip the mouse to the entire window instead of a 1x1 rectangle in exclusive mode. 2012-01-19 21:08:51 +01:00
Vitaliy Margolen 35016b0513 dinput: Report mouse and keyboard as being emulated. This works better for some games. 2011-10-31 16:46:21 +01:00
Vitaliy Margolen d7db5d5399 dinput: Don't mask buffer overflow error. 2011-10-17 17:45:01 +02:00
Lucas Fialho Zawacki 64c1f4778c dinput: Proper conversion of username parameters for Set and BuildActionMap. 2011-08-24 11:51:51 +02:00
Lucas Fialho Zawacki d175c1526f dinput: Common implementation for joystick, keyboard and mouse SetActionMap. 2011-08-24 11:51:42 +02:00
Lucas Fialho Zawacki c0fd222321 dinput: Common implementation of BuildActionMap for keyboard and mouse. 2011-08-24 11:51:39 +02:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
Lucas Fialho Zawacki 39684c7e3a dinput: SetActionMap and queue_event setting mapped data. 2011-07-04 20:25:00 +02:00
Lucas Fialho Zawacki b590090a48 dinput: SetActionMap constructing a dataformat for keyboard and mouse. 2011-07-04 20:24:48 +02:00
Lucas Fialho Zawacki 83aded2754 dinput: Keyboard and mouse implementation of BuildActionMap. 2011-07-04 20:24:10 +02:00
Alexandre Julliard 86b682154b dinput: Reset the clipped flag when the cursor is released. 2011-05-05 16:32:00 +02:00
Alexandre Julliard 0036e438db dinput: Pass mouse messages through if the request to clip the cursor is rejected. 2011-04-26 16:04:23 +02:00
Alexandre Julliard c52f415415 dinput: Use a 1x1 clipping rect instead of warping the mouse in exclusive mode. 2011-04-26 16:04:00 +02:00
Alexandre Julliard 5f2daff124 dinput: Add a helper function for mouse warping. 2011-04-26 15:31:32 +02:00
Alexandre Julliard 8578f9c375 dinput: Get rid of some redundant coordinate mappings. 2011-04-26 15:31:31 +02:00
Vitaliy Margolen 0ac5c60374 dinput: Combine ASCII and Unicode device create callbacks. Add tests. 2011-01-24 14:43:09 +01:00
Vitaliy Margolen 9441d898f7 dinput: Make newly created device append itself to Direct Input's list. 2011-01-19 12:58:01 +01:00
Vitaliy Margolen 6b30480021 dinput: COM cleanup - use interfaces instead of vtbl. Combine both Unicode and ASCII interfaces into the same classes. 2011-01-10 12:41:20 +01:00
Vitaliy Margolen 30ab6c1749 dinput: Explicitly define ASCII and Unicode methods in mouse. 2011-01-10 11:03:40 +01:00
Vitaliy Margolen 0f24b9e86f dinput: Explicitly define ASCII and Unicode methods in DirectInputDevice base class. Make ASCII methods call Unicode. Use new methods in child classes. 2011-01-10 11:03:17 +01:00
Vitaliy Margolen 625fefca61 dinput: COM cleanup - use helper function instead of direct typecast in mouse. 2011-01-10 11:01:39 +01:00
Vitaliy Margolen 0b99bf3edb dinput: COM cleanup - use proper interface instead of typecasting This when calling queue_event. 2011-01-10 10:58:26 +01:00
Vitaliy Margolen 15216098e0 dinput: COM cleanup - use proper DirectInput interface with IUknown calls. 2011-01-10 10:58:14 +01:00
Vitaliy Margolen 179b862738 dinput: Rename IDirectInputDevice2AImpl into IDirectInputDeviceImpl. 2011-01-03 16:46:41 +01:00
Andrew Talbot e6649952fa dinput: Constify some variables. 2010-08-31 14:23:47 +02:00
Michael Stefaniuc 2004db1bb1 dinput: Don't use HIWORD to check if a REFGUID is a DIPROP. 2010-02-02 11:47:20 +01:00
Vitaliy Margolen 2665272d6c dinput: Pass event instance ID to queue_event instead of offset. 2009-11-30 12:49:11 +01:00
Vitaliy Margolen 74f2eccc90 dinput: Let each device decide which hook event to skip.
Some programs acquire mouse in exclusive and keyboard in non-exclusive mode.
2009-02-23 12:19:25 +01:00
Alexandre Julliard fffcd23cce dinput: Fix pointer cast warnings on 64-bit. 2009-01-05 12:39:44 +01:00
Vitaliy Margolen 517462cf9a dinput: Add mouse warp override config option. 2008-08-20 14:05:18 +02:00
Vitaliy Margolen aa0188cd6f dinput: Zero the out buffer. 2008-07-28 12:16:34 +02:00
Austin English 06d429d6b6 Spelling fixes. 2008-03-27 20:48:19 +01:00
Andrew Talbot da0a48d235 dinput: Assign to structs instead of using memcpy. 2008-03-01 12:02:19 +01:00
Vitaliy Margolen 971c4e19d6 dinput: Don't use event times, report current tick count instead. 2008-02-15 10:12:51 +01:00
Vitaliy Margolen eca356829c Revert "dinput: Skip old mouse movement events.".
This reverts commit 3187669512.
2008-02-15 10:12:45 +01:00
Marcus Meissner 9438ebfa20 dinput: Make _dump_mouse_state static. 2008-02-12 22:36:13 +01:00
Vitaliy Margolen 3187669512 dinput: Skip old mouse movement events. 2008-02-11 21:00:09 +01:00
Gerald Pfeifer 79ccb7889c dinput: Fix type of loop variable in alloc_device(). 2007-11-02 12:37:09 +01:00
Vitaliy Margolen 7e6d0e71eb dinput: Use ClipCursor() to keep mouse from leaving the window. 2007-10-10 12:16:16 +02:00
Vitaliy Margolen 64ef4c4edf dinput: Add helper function to dump mouse state. 2007-09-11 12:34:27 +02:00
Vitaliy Margolen c78b8a17fd dinput: Properly increment sequence number for X only movement. 2007-08-17 12:01:37 +02:00
Vitaliy Margolen 8f28d4369e dinput: Rename set_dinput_hook and call it from the base class.
Since keyboard's acquire and unacquire don't do anything special just call
the base class.
2007-07-09 14:31:38 +02:00
Vitaliy Margolen deb74efc04 dinput: Handle multiple keyboard and mouse devices. 2007-07-09 14:27:25 +02:00
Vitaliy Margolen 6d6e4f4ea2 dinput: Export Mouse and Keyboard GUIDs. 2007-07-09 14:25:47 +02:00
Vitaliy Margolen fb1082ae73 dinput: Combine all Release functionality into base class. 2007-06-28 12:16:11 +02:00
Vitaliy Margolen d2966c2dfb dinput: Move parent dinput reference into base class. 2007-06-28 12:16:11 +02:00
Vitaliy Margolen 6a8bf96d73 dinput: Make sure to unacquire device before freeing it. 2007-06-04 13:10:04 +02:00
Dmitry Timoshkov 3c9e7a7f33 wine: Switch to using 'long' for INT_PTR type for 64-bit compatibility. 2007-05-25 20:37:56 +02:00
Jan Zerebecki 52a630a3a8 dinput: Add DebugInfo to critical sections. 2007-03-08 22:21:43 +01:00
Andrew Talbot e744c3a5b1 dinput: Constify some variables. 2007-02-13 12:08:26 +01:00
Vitaliy Margolen dbd2112eee dinput: Internal data format is not const anymore. 2007-01-11 11:49:12 +01:00
Vitaliy Margolen adddc56699 dinput: Fix trace formatting. 2007-01-10 12:23:16 +01:00
Vitaliy Margolen 4b33fd691a dinput: Set event from queue_event, simplifying code a bit. 2007-01-08 21:13:40 +01:00
Vitaliy Margolen b223b021a5 dinput: Fix memory leak. 2007-01-06 11:40:46 +01:00
Vitaliy Margolen 30e2fbcb6e dinput: Fix mouse to use proper offset when queuing new events. Add handling of X-buttons.
We should use instance IDs instead of sequential numbers to get correct offset.
2007-01-06 11:40:46 +01:00
Vitaliy Margolen 4c1e52e123 dinput: Fix cut and paste error. 2007-01-04 21:14:19 +01:00
Vitaliy Margolen f2a3ad2481 dinput: Implement mouse GetObjectInfo on top of base class. 2007-01-04 09:57:35 +01:00
Vitaliy Margolen 685a3e6a6e dinput: Release critical section before warping mouse. 2006-12-29 12:49:41 +01:00
Vitaliy Margolen 0eb110f3ca dinput: Move mouse to using new EnumObjects from base class. 2006-12-28 12:23:07 +01:00
Vitaliy Margolen 18ee811e4c dinput: mouse: Copy and modify default data format. 2006-12-28 12:22:49 +01:00
Vitaliy Margolen ce5fb9bb29 dinput: AddRef and Release parent DirectInput class. 2006-12-24 13:07:15 +01:00
Vitaliy Margolen 938657b1c1 dinput: Warp mouse in exclusive cooperation mode only. 2006-12-20 14:12:49 +01:00
Vitaliy Margolen 546c7a502d dinput: Use GetCursorPos() to calculate relative mouse movements. 2006-12-20 14:12:42 +01:00
Vitaliy Margolen 975d7ff292 dinput: Make mouse use axis mode flag set in base class. Add tests. 2006-12-18 12:01:05 +01:00
Vitaliy Margolen aa8392c9e7 dinput: Use standard mouse data format instead of custom one. 2006-12-12 20:24:20 +01:00
Vitaliy Margolen 6246fa62f9 dinput: Remove redundant parameter. 2006-12-12 20:24:10 +01:00
Vitaliy Margolen d5b57f3904 dinput: Move mouse & keyboard user data format to base class. 2006-12-12 20:23:57 +01:00
Vitaliy Margolen cd050bf25c dinput: Move transform and offsets structures into base device class. 2006-12-12 20:22:44 +01:00
Vitaliy Margolen 267cbf8289 dinput: Move internal function calculate_ids to where it's really used. 2006-12-11 16:17:40 +01:00
Vitaliy Margolen fb5884203b dinput: Move mouse event queue into base device class. 2006-12-05 11:32:46 +01:00
Vitaliy Margolen 0da0486cc3 dinput: Move critical section to the base device class. 2006-12-04 12:33:47 +01:00
Vitaliy Margolen f7eacd64d1 dinput: Move acquired flag to the base device class. Add tests. 2006-12-04 12:33:35 +01:00
Vitaliy Margolen 1dae4c6832 dinput: Move SetCooperativeLevel into base class. 2006-10-17 12:36:13 +02:00
Vitaliy Margolen af34ef12ba dinput: Move SetEventNotification and associated event into base class. 2006-10-17 12:36:00 +02:00
Vitaliy Margolen 7d838d9e6f dinput: Use dinput device as a base class for keyboard, mouse and joystick. 2006-10-17 12:35:39 +02:00
Vitaliy Margolen 7123f3e80e dinput: Win64 printf format warning fixes. 2006-10-09 12:53:41 +02:00