summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
AgeCommit message (Collapse)Author
2021-06-07ControllerInterface: RefactorFiloppi
-Fix Add/Remove/Refresh device safety, devices could be added and removed at the same time, causing missing or duplicated devices (rare but possible) -Fix other devices population race conditions in ControllerInterface -Avoid re-creating all devices when dolphin is being shut down -Avoid re-creating devices when the render window handle has changed (just the relevantr ones now) -Avoid sending Devices Changed events if devices haven't actually changed -Made most devices populations will be made async, to increase performance and avoid hanging the host or CPU thread on manual devices refresh
2021-06-07ControllerInterface: mixed commentsFiloppi
2021-06-07ControllerInterface: fix rare deadlockFiloppi
A "devices changed" callback could have ended up waiting on another thread that was also populating devices and waiting on the previous thread to release the callbacks mutex.
2021-05-31ControllerInterface: make DSU inputs start from resting pose instead of 0. ↵Filoppi
Add battery level
2021-05-31ControllerInterface: DSU polish: avoid hanging host thread, add ↵Filoppi
disconnection detection, ... -Reworked thread waits to never hang the Host thread for more than a really small time (e.g. when disabling DSU its thread now closes almost immediately) -Improve robustness when a large amount of devices are connected -Add devices disconnection detection (they'd stay there forever until manually refreshed)
2021-05-31ControllerInterface: fix DSU using the same client uid between server and ↵Filoppi
controllers queries that's not the way it's supposed to work
2021-05-24Expose Control Expression variables to mappings UIFiloppi
-add a way to reset their value (from the mappings UI) -fix "memory leak" where they would never be cleaned, one would be created every time you wrote a character after a "$" -fix ability to create variables with an empty string by just writing "$" (+added error for it) -Add $ operator to the UI operators list, to expose this functionality even more
2021-05-19IMUGyroscope: make GetState update optional (on by default), fix const, ↵Filoppi
clean code My future PRs will split the UI state from the Emulation State of some of these emulated controller values and this readies the code for it.
2021-05-19InputCommon: improve code that returns a controller attachment indexFiloppi
casting a value to a u32 when it's originally an int, and it's exposed as int to users, could end up in cases where a negative number would result as a positive one. This doesn't really affect the value range of the attachment enum, still I think the code was wrong. Heavily tested.
2021-05-19IMUAccelerometer: consistency of BoundCount checksFiloppi
Similar to the guitar, only control[0] was checked, and that felt random.
2021-05-14Merge pull request #9688 from Filoppi/input_cleanupScott Mansell
Input cleanup
2021-05-12StickGate: add custom clamp valueFiloppi
Works exactly as before by default. It will be used by my upcoming input PRs.
2021-05-12InputCommon: follow coding conventionsFiloppi
2021-05-12InputCommon: clamp the attachment setting max to its actual enum maxFiloppi
NumericSettings support a max, so let's use it. It might not do much now, but the max and min values will be used to give visual feeback in the UI in one of my upcoming input PRs
2021-05-12Add mixed comments to input code, make some tooltip clearerFiloppi
2021-05-12InputCommon: fix serialization of control expression with line breaksFiloppi
The control expression editor allows line breaks, but the serialization was losing anything after the first line break (/r /n). Instead of opting to encode them and decode them on serialization (which I tried but was not safe, as it would lose /n written in the string by users), I opted to replace them with a space.
2021-05-10InputCommon: follow coding conventions and rename GetState() to UpdateState()Filoppi
And remove useless include
2021-05-10InputCommon: add a ton of missing constsFiloppi
fix some related grammar errors only the ButtonManager required code changes
2021-05-05InputCommon: replace SerialInterface log with ControllerInterfaceFiloppi
where appropriate. SerialInterface was a leftover from the past, and makes no sense to be used on actual/real controllers.
2021-04-28Merge pull request #9674 from Filoppi/fix_hotkey_suppresion_crashJordan Woyak
Fix hotkey suppression crash
2021-04-26InputCommon: small hotkey threshold symmetry fixFiloppi
2021-04-26InputCommon: fix hotkey suppression crash if nullptr suppressions were added ↵Filoppi
to the map Update references was failing to update the references, causing input to stay nullptr and crashing. I fixed the case that triggered that, though also added checks against nullptrs for safety. (cherry picked from commit 4bdcf707555a5568eddff957fa3604975ffb6ed7)
2021-04-02Replace uses of cassert with Common/Assert.hPokechu22
2021-03-17InputCommon: Allow for partial gyro mapping; for Free Look, this allows you ↵iwubcode
to only pitch or only yaw
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-03-16Merge pull request #9558 from iwubcode/dsu-multi-server-avoid-blockingLéo Lam
InputCommon: block on DSU servers collectively instead of individually
2021-03-07Touchscreen: Add override specifiersDentomologist
Fix -Winconsistent-missing-override warnings on Android
2021-03-07ControllerInterface: Fix unused-result warningDentomologist
Add ! before unused variables to 'use' them. Ubuntu-x64 emits warnings for unused variables because gcc decides it should ignore the void cast around them. See thread for discussion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
2021-03-07FreeLookController: Fix signed/unsigned warningDentomologist
Loop index int i was being compared against GetControllerCount() which returned a size_t. This was the only place GetControllerCount() was called from so the change of return type doesn't disturb anything else. Changing the loop index to size_t wouldn't work as well since it's passed into GetController(), which takes an int and is called from many places, so it would need a cast anyway on an already busy line.
2021-03-05InputCommon: instead of blocking on individual DSU server sockets, block on ↵iwubcode
a selector built up from all server sockets
2021-03-02Merge pull request #9539 from iwubcode/dynamic_input_tex_more_optimizationsLéo Lam
InputCommon: dynamic input textures more optimizations
2021-03-01Merge pull request #9492 from nolange/fix_norandr_buildLéo Lam
Cleanup X11 and XRANDR Macros
2021-02-27InputCommon: reduce number of image loads and texture cache invalidations by ↵iwubcode
only running dynamic input textures once for all controllers
2021-02-26Common: don't call OnConfigChanged() unless it has actually changedFiloppi
DualShock UDP Client is the only place in the code that assumed OnConfigChanged() is called at least once on startup or it won't load up the setting, so I took care of that
2021-02-22Cleanup X11 and XRANDR MacrosNorbert Lange
This fixes build with X11 enabled and XRANDR disabled.
2021-02-19InputCommon: Move initial dynamic input texture configuration logic to a ↵iwubcode
'specification 1' function and load in a 'specification' attribute that defaults to 1 if not present (with 1 being the only valid value at the moment)
2021-02-16InputCommon: Move DynamicInputTextureData to DynamicInputTextures::Dataiwubcode
2021-02-16InputCommon: Move DynamicInputTextureConfiguration to ↵iwubcode
DynamicInputTextures::Configuration
2021-02-11InputCommon: When using dynamic input textures, only call force reload ↵iwubcode
textures once for packs that have multiple configurations
2021-01-27msbuild: bundle all dolphin "core" code into single libraryShawn Hoffman
2021-01-27rename InputCommon/ControllerInterface/Device to CoreDeviceShawn Hoffman
2021-01-27rename ciface::Wiimote to ciface::WiimoteControllerShawn Hoffman
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2021-01-05Fix a couple of typosFilippo Tarpini
[committer note: fixed commit message style]
2021-01-05Merge pull request #9418 from Filoppi/patch-10Léo Lam
Fix DualShockUDP not adding/removing devices correctly
2021-01-03Fix DualShockUDP not adding/removing devices correctlyFilippo Tarpini
-If adding 2 devices with the same name, they their unique id wouldn't be increased, causing a conflict. -Removing a device wouldn't actually remove it from the internal devices list because the list of devices had already been updated when going through it. -It was possible to remove devices belonging to other sources by adding a device with the same name and then removing it.
2021-01-02Fix Quartz cursor going to +infinite if the window size was 0Filippo Tarpini
2021-01-02Fix DInput cursor going to +infinite if the window size was 0Filippo Tarpini
2021-01-02Fix XInput2 cursor going to +infinite if the window size was 0Filippo Tarpini
2020-12-13InputCommon: Fix callback dispatch deadlockseth
Make sure m_is_populating_devices is true when a WM_INPUT_DEVICE_CHANGE event is received directly on the ciface thread, so that callbacks do not occur while removing devices. This breaks a hold-and-wait deadlock between the ciface thread and the CPU thread when using emulated Wiimotes. Co-authored-by: brainleq <brainleq@users.noreply.github.com> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>