summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput
AgeCommit message (Collapse)Author
2024-08-14Use 'contains' methodDr. Dystopia
2024-06-15Merge pull request #12850 from jordan-woyak/device-sortingAdmiral H. Curtiss
ControllerInterface: Adjust sort priorities to ensure default keyboard-mouse device is first.
2024-06-15ControllerInterface: Adjust sort priorities to ensure default keyboard-mouse ↵Jordan Woyak
device is first.
2024-05-31TAS Input: Enable hotkeys and controller input when Input has focusDentomologist
Enable emulator hotkeys and controller input (when that option is enabled) when a TAS Input window has focus, as if it was the render window instead. This allows TASers to use frame advance and the like without having to switch the focused window or disabling Hotkeys Require Window Focus which also picks up keypresses while other apps are active. Cursor updates are disabled when the TAS Input window has focus, as otherwise the Wii IR widget (and anything else controlled by the mouse) becomes unusable. The cursor continues to work normally when the render window has focus.
2023-12-18Input: Improve Controller Interface devices threadingFiloppi
This specific issue was already addressed by https://github.com/dolphin-emu/dolphin/pull/11635 though I felt like there was something more we could do, and wasn't too happy with the likelihood of devices update calls being skipped (due to `m_devices_population_mutex` being locked).
2023-06-18Replace std::ostringstream usage with fmt::formatget
2022-07-26Merge pull request #10858 from AdmiralCurtiss/mouse-center-hotkeyAdmiral H. Curtiss
Add hotkey for centering mouse in render window.
2022-07-25StripSpaces: only strip spacesShawn Hoffman
StripWhitespace maintains old behavior
2022-07-25DInput: Handle mouse centering hotkey.Admiral H. Curtiss
2022-07-15InputCommon: Get rid of static strings.Admiral H. Curtiss
2022-04-03ControllerInterface: Update sort priorities.Jordan Woyak
2022-01-09Use HRWrap in remaining locationsPokechu22
Note that D3DCommon can't use DX11HRWrap or DX12HRWrap since it's shared between them.
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.