summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput
AgeCommit message (Collapse)Author
2021-12-10Treewide: Adjust order of includesPokechu22
2021-12-05InputCommon: fix default input config default device not being loaded/foundFiloppi
Fixes bug: https://bugs.dolphin-emu.org/issues/12744 Before https://github.com/dolphin-emu/dolphin/commit/e1e3db13baabefa89991388d37db0bb260c4f535 the ControllerInterface m_devices_mutex was "wrongfully" locked for the whole Initialize() call, which included the first device population refresh, this has the unwanted (accidental) consequence of often preventing the different pads (GC Pad, Wii Contollers, ...) input configs from loading until that mutex was released (the input config defaults loading was blocked in EmulatedController::LoadDefaults()), which meant that the devices population would often have the time to finish adding its first device, which would then be selected as default device (by design, the first device added to the CI is the default default device, usually the "Keyboard and Mouse" device). After the commit mentioned above removed the unnecessary m_devices_mutex calls, the default default device would fail to load (be found) causing the default input mappings, which are specifically written for the default default device on every platform, to not be bound to any physical device input, breaking input on new dolphin installations (until a user tried to customize the default device manually). Default devices are now always added synchronously to avoid the problem, and so they should in the future (I added comments and warnings to help with that)
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-06-07ControllerInterface: polish DInput Keyboard and Mouse (add comments and logs)Filoppi
Also fix the cursor axis not being updated when the mouse device had failed aquiring, despite them being completely unrelated
2021-06-07ControllerInterface: DInput Joystick fix non thread safe static variableFiloppi
also fix devices being added to its own custom list of devices even when rejected by the CI
2021-06-07ControllerInterface: Implement ChangeWindow on DInput without recreating the ↵Filoppi
devices Also polished DInput code in general to try and mitigate issue 11702. Added a lot of logging and comments.
2021-06-07ControllerInterface: devices population is now async so implement devices ↵Filoppi
sorting priority This helps us keeping the most important devices (e.g. Mouse and Keyboard) on the top of the list of devices (they still are on all OSes supported by dolphin and to make hotplug devices like DSU appear at the bottom.
2021-06-07ControllerInterface: mixed commentsFiloppi
2021-03-17InputCommon / DolphinQt / Core: Add a "RelativeMouse" input which provides ↵iwubcode
the raw delta mouse input Co-authored-by: Jordan Woyak <jordan.woyak@gmail.com>
2021-01-27rename InputCommon/ControllerInterface/Device to CoreDeviceShawn Hoffman
2021-01-02Fix DInput cursor going to +infinite if the window size was 0Filippo Tarpini
2020-10-23InputCommon: Migrate logging over to fmtLioncash
Continues the migration of the logging calls over to the fmt capable ones.
2020-09-25ControllerInterface: Add platform consistent names for modifier keys.Jordan Woyak
2020-07-08Common: Rename UTF16ToUTF8JosJuice
This function does *not* always convert from UTF-16. It converts from UTF-16 on Windows and UTF-32 on other operating systems. Also renaming UTF8ToUTF16 for consistency, even though it technically doesn't have the same problem since it only was implemented on Windows.
2020-02-22InputCommon: Constify Device::Input::IsDetectable function.Jordan Woyak
2020-02-08Cleanup: Use std::abs instead of abs.Jordan Woyak
2020-01-24InputCommon: Make "Cursor" inputs aware of the rendered aspect ratio.Jordan Woyak
2019-08-02InputCommon/DInputJoystick: Correct force-feedback flag testingLioncash
Introduced in a995e2f5ba3bb55b4245675428bbdc3d34cb7355 We need to be performing a bitwise AND on the flags and not a logical AND, otherwise we could end up counting device objects that don't support forced feedback.
2019-06-17InputCommon: Use nested namespace specifiers where applicableLioncash
2019-05-08InputCommon/DInput.h: Add missing includespycrab
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2019-04-20ControllerInterface/DInput: Optimize cursor position updating.Jordan Woyak
2019-03-29ControllerInterface/Win32: Prevent devcies from losing their "id" on a ↵Jordan Woyak
hotplug event.
2019-03-29Add hotplug support to DInput and XInput controller backendsMichael M
2019-03-19ControllerInterface: Unbreak DirectInput POV Hats having bad values on init.Jordan Woyak
2019-03-03ControllerInterface: Input detection improvements.Jordan Woyak
2019-01-06DirectInput: Use more than 8 bits of precision on axis inputs.Jordan Woyak
2019-01-05ControllerInterface: Set DInput FF effect parameters sanely. This fixes a ↵Jordan Woyak
crash with periodic effects and my GCPad adapter (probably a divide by zero behind the scenes).
2018-12-24ControllerInterface: DInput: Update force feedback effects in a thread. This ↵Jordan Woyak
should prevent slowdowns experienced by a handful of users.
2017-06-05Fix minor formatting issuesLéo Lam
These were not caught by the lint script while it was broken.
2017-01-23No longer need to //clang-format off for Windows headersMichael Maltese
2016-11-30ControllerInterface: replace Reinitialize with RefreshDevicesMichael Maltese
The SDL backend crashes when you close a joystick after SDL_Quit has been called. Some backends don't need to be shutdown and re-initialized everytime, we can just ask to enumerate devices again.
2016-08-11InputCommon: Fix slow startup on some Windows systemsEmptyChaos
Rewrite GetXInputGUIDS to use SetupAPI instead of WMI Queries. When using a language pack where the system language and user/program language differ, Windows starts taking a VERY long time (10+ seconds) to complete Queries for Win32_PNPEntity objects (it's probably translating every single string since it transfers every single one from the WMI server into memory in the program). Fixes Issue 9744.
2016-07-14ControllerInterface: Make the ID assigning code commonLéo Lam
This makes the device ID assigning code common to all backends, by moving it to AddDevice() instead of copy-pasting or replicating the logic in the backends. Also, to prepare for hotplugging, instead of relying on a name usage count, the new ID assigning system always starts from ID 0 and tries to assign the first ID that is not used.
2016-06-25ControllerInterface: Switch to std::shared_ptrLéo Lam
Small cleanup by using std::shared_ptr and getting rid of ciface.Devices() which just returned the m_devices (which defeats the point of making m_devices protected). Incidentally, this should make the code safer when we have different threads accessing devices in the future (for hotplug?). A lot of code use Device references directly so there is no easy way to remove FindDevice() and make those unique_ptrs.
2016-06-25Fix a small formatting issueLéo Lam
2016-06-25ControllerInterface: Don't pass m_devices to the backendsLéo Lam
Previously, the devices vector would be passed to all backends. They would then manually push_back to it to add new devices. This was fine but caused issues when trying to add synchronisation. Instead, backends now call AddDevice() to fill m_devices so that it is not accessible from the outside.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-24Ignored the mouse position unless the cursor is over the Dolphin window.skidau
Fixes issue 8673.
2015-09-05Add missing override specifiersLioncash
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25Add missing license headersTillmann Karras
2015-03-28Track the co-ordinates of the mouse relative to the pointed window instead ↵skidau
of the original hwnd.
2014-11-28ControllerInterface: Make UpdateInput / UpdateOutput return voidJasper St. Pierre
The return values here have never been checked, so it doesn't make sense to return a value to begin with.
2014-11-28ControllerInterface: Remove unused ClearInputStateJasper St. Pierre
2014-11-28DInput: Remove the unsupported Lights outputJasper St. Pierre
The LEDs feature doesn't actually do anything: the SetState method is entirely commented out.
2014-11-11Fix some double->float conversions.Rachel Bryk
2014-09-03Change ControlState typedef to double, and change all related floats/doubles ↵Rachel Bryk
to use it. Fixes an off by 1 issue related to double->float->double conversion, and eliminates numerous warnings.