Commit graph

1471 commits

Author SHA1 Message Date
Alistair Leslie-Hughes 1b99f38bf3 dinput: Remove DECLSPEC_HIDDEN usage. 2023-08-01 21:45:01 +09:00
Rémi Bernon 4151acb4e8 dinput: Unacquire only DISCL_FOREGROUND devices on foreground changes.
Fixes broken input in Final Fantasy XIII after main window focus loss.
2023-07-27 13:12:06 +09:00
Alexandre Julliard aa9aace5f3 dinput: Use nameless unions/structs. 2023-07-10 21:15:55 +02:00
Alistair Leslie-Hughes f9bd79dce2 dinput: Remove DECLSPEC_HIDDEN usage. 2023-07-07 12:20:53 +02:00
Alexandre Julliard 93630ce14e include: Remove redundant __WINE_USE_MSVCRT checks. 2023-06-12 21:21:41 +02:00
Rémi Bernon c0877844e7 windows.gaming.input: Query IGameController interface in TryGetFactoryControllerFromGameController. 2023-05-23 14:43:12 +02:00
Rémi Bernon eab7b95bab dinput/tests: Test that FromGameController also works with IRawGameController. 2023-05-23 14:43:12 +02:00
Rémi Bernon 88a34c74b0 dinput: Delay input thread start until the first device acquire.
Some applications create a IDirectInput and IDirectInputDevice instance
from their DllMain procedure, and starting the thread on the first user
creation and waiting for it to start will deadlock on the loader lock.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54916
2023-05-22 11:10:07 +02:00
Rémi Bernon cb7bb2284c dinput: Avoid remapping already mapped objects in BuildActionMap.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54917
2023-05-22 11:10:07 +02:00
Rémi Bernon df6bc20b90 dinput: Clear DIA_APPNOMAP BuildActionMap flag with specific device semantic.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54917
2023-05-19 11:08:30 -05:00
Rémi Bernon 5b648e7e5d dinput: Reset action map mapping before loading the registry mapping.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54917
2023-05-19 11:08:30 -05:00
Rémi Bernon b95c820557 dinput: Delete the action mapping registry key on SetActionMap.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54917
2023-05-19 11:08:30 -05:00
Rémi Bernon bed1ecba2f dinput/tests: Add some tests with keyboard action mapping.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54917
2023-05-19 11:08:30 -05:00
Rémi Bernon cbbb88f2b4 dinput/tests: Add a zero-terminator for hardware ids (Valgrind). 2023-05-16 08:04:39 -05:00
Rémi Bernon dde9cef0ff dinput/tests: Avoid leaking data in add_file_to_catalog (Valgrind). 2023-05-15 06:09:54 -05:00
Rémi Bernon fefc1e57d2 dinput/tests: Avoid leaking a IDirectInput reference (Valgrind). 2023-05-15 06:09:54 -05:00
Francois Gouget 089cfc7953 dinput/tests: Fix the spelling of an ok() message. 2023-04-07 17:10:41 +02:00
Rémi Bernon 3fad9cac5b dinput/tests: Mark some tests as flaky to work around fvwm bug.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54594
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54713
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54774
2023-04-06 14:32:33 +02:00
Florian Will c5a58aed08 dinput/tests: Remove unmatched winetest_pop_context(). 2023-04-04 11:55:37 +02:00
Florian Will ba889f2c4c dinput: Set guidType = GUID_Unknown for HID collections.
Fixes an issue in Zusi 3 where DIDFT_COLLECTION objects would be passed
to SetDataFormat.
2023-04-04 11:55:36 +02:00
Florian Will 4413356d19 dinput/tests: Add guidType test for collection objects. 2023-04-04 11:55:35 +02:00
Florian Will dcb84a45f6 dinput: Fix EnumObjects callback return value handling.
This solves an issue in ZUSI 3 settings for DirectInput devices. Delphi
defines the True value of the "C-compatible" LongBool type as -1, which
wine interpreted to mean DIENUM_STOP because it is != DIENUM_CONTINUE.
Change that logic so only an explicit DIENUM_STOP (= 0) return value
stops the enumeration of objects.
2023-04-03 16:52:01 +02:00
Florian Will c04319e5a0 dinput/tests: Add EnumObjects callback return value test. 2023-04-03 16:52:01 +02:00
Michael Stefaniuc 6acbec1927 dinput: Remove superfluous cast to self. 2023-03-31 11:10:58 +02:00
Michael Stefaniuc 567e35ceaf dinput/tests: Drop superfluous TRUE : FALSE conditional expressions. 2023-03-31 11:10:58 +02:00
Michael Stefaniuc 4af8f42382 dinput/tests: Use separate statements instead of the comma operator. 2023-03-30 18:49:23 +02:00
Rémi Bernon d62e2268d7 dinput: Rewrite IDirectInput8_EnumDevicesBySemantics.
Simplifying and fixing it.
2023-03-27 21:23:09 +02:00
Rémi Bernon cb987646a4 dinput: Implement DIDBAM_PRESERVE BuildActionMap flag. 2023-03-27 21:23:09 +02:00
Rémi Bernon 782ad8f70c dinput: Check device type in BuildActionMap for specific semantics. 2023-03-27 21:23:08 +02:00
Rémi Bernon 18b5f7956f dinput: Load action map from registry before resetting guid. 2023-03-27 21:23:08 +02:00
Rémi Bernon 2da8f5d2ac dinput: Trace formats in (Build|Set)ActionMap and EnumDevicesBySemantics. 2023-03-27 21:23:08 +02:00
Rémi Bernon 8e63f68fb3 dinput/tests: Add more IDirectInput8_EnumDevicesBySemantics tests. 2023-03-27 21:23:08 +02:00
Rémi Bernon 83881f579f dinput/tests: Test BuildActionMap cases with multiple devices. 2023-03-27 21:23:08 +02:00
Vicki Pfau 6a88500af2 hidparse.sys: Include zero-count reports in cap count.
Signed-off-by: Vicki Pfau <vi@endrift.com>
2023-03-27 11:05:34 +02:00
Rémi Bernon bf22424e2a dinput: Return DI_SETTINGSNOTSAVED when DIDSAM_FORCESAVE is used. 2023-03-22 20:03:51 +01:00
Rémi Bernon 5d3f2d18ad dinput: Check IDirectInputDevice8W_SetActionMap flags. 2023-03-22 20:03:51 +01:00
Rémi Bernon 0fe8da86e3 dinput: Allow action formats with no matching actions. 2023-03-22 20:03:51 +01:00
Rémi Bernon b1a95b9671 dinput: Keep device objects app data in the object properties. 2023-03-22 20:03:51 +01:00
Rémi Bernon 63637f2407 dinput: Return error from SetActionMap if SetDataFormat fails. 2023-03-22 20:03:51 +01:00
Rémi Bernon c6a922c1a1 dinput: Respect DIA_APPNOMAP in IDirectInputDevice8W_SetActionMap. 2023-03-22 20:03:51 +01:00
Rémi Bernon 8ff74b157a dinput: Initialize object formats from device objects in SetActionMap. 2023-03-22 20:03:51 +01:00
Rémi Bernon df90c379fb dinput: Use 4 bytes for every object user state in SetActionMap. 2023-03-22 20:03:51 +01:00
Rémi Bernon 8e069f0bf2 dinput: Only set DIPROP_RANGE in SetActionMap if range isn't empty. 2023-03-22 20:03:51 +01:00
Rémi Bernon be1ef8ed1f dinput: Always set the DIPROP_BUFFERSIZE property in SetActionMap. 2023-03-21 18:29:07 +01:00
Rémi Bernon 32b43d09e1 dinput: Initialize SetActionMap variables in their declarations. 2023-03-21 18:29:07 +01:00
Rémi Bernon 80a35fb423 dinput: Always allocate and initialize the object_properties. 2023-03-21 18:29:07 +01:00
Rémi Bernon f20940693e dinput: Move mouse_create_device function around. 2023-03-21 18:29:07 +01:00
Rémi Bernon 256f35dc42 dinput: Initialize device object format when creating devices. 2023-03-21 18:29:07 +01:00
Rémi Bernon b75bd86ebd dinput: Count the actual number of object formats in SetActionMap.
Fixes crash introduced by 7b3f3d6078, as
SetActionMap is now called with unsupposed flags from the tests and
skips some objects.
2023-03-21 18:29:05 +01:00
Rémi Bernon 01e4c4335a dinput/tests: Flush messages after creating the test_mouse_keyboard window.
Preventing spurious failures on some Windows 7 VMs.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=54713
2023-03-21 17:29:01 +01:00