summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
AgeCommit message (Collapse)Author
2016-07-30InputConfigDiag: Don't prevent closing dialog if device not foundLéo Lam
There is no reason to prevent the user from closing the config dialog if the device is not found. It's not very good UX… Also fixes ExpressionParser to return NO_DEVICE if the device doesn't exist instead of SUCCESS.
2016-07-29evdev: Add hotplugging supportLéo Lam
This adds hotplugging support to the evdev input backend. We use libudev to monitor changes to input devices in a separate thread. Removed devices are removed from the devices list, and new devices are added to the list. The effect is that controllers are usable immediately after plugging them without having to manually refresh devices (if they were configured to be used, of course).
2016-07-29ControllerInterface: Don't block on UpdateInput()Léo Lam
Changes UpdateInput() to skip if we can't lock the mutex, instead of potentially blocking the CPU thread and causing a short but noticeable frame drop.
2016-07-29ControllerInterface: Add RemoveDevice()Léo Lam
This adds RemoveDevice() to ControllerInterface, fixes ExpressionParser and some other code to support device removals without crashing, and adds an IsValid() method to Device, to prepare for hotplugging.
2016-07-29ControllerInterface: Add a way to register callbacksLéo Lam
This adds RegisterHotplugCallback() to register a callback which will be invoked by the input backends' hotplug threads when there is a new device, so that Core (GCKeyboard, GCPad, Wiimote, Hotkey) can reload the configuration without adding a dependency to Core from InputCommon.
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-07-12Strip whitespace from Evdev and OSX controller names.Scott Mansell
2016-07-11evdev: Clamp axis values to the 0.0-1.0 rangeLéo Lam
The values are expected to be in the 0.0-1.0 range (as indicated by the comment), and other parts of Dolphin also expect it to be in that range since the "full" axis has a -1.0 to 1.0 range. However, this is not always the case and fvalue can end up being outside of the range. This clamps fvalue to always be in the 0.0 and 1.0 range.
2016-06-26Merge pull request #3943 from ShadowsFriend/nopch-fixMat M
ControllerInterface: Include memory to fix building without pch
2016-06-25Device: Use std::tie for DeviceQualifier's operator==Lioncash
2016-06-26ControllerInterface: Include memory to fix building without pchChristian Widmer
All affected files use shared_ptr but do not include memory which breaks building without precompiled headers.
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: Add synchronisationLéo Lam
Since we may have to add/access devices from different threads, this adds synchronisation to anything that touches m_devices.
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
2016-04-23XInput: Apply Rumble/Motor output only on changes (again)mimimi085181
Disclaimer: I can't test if this works on xbox one controllers, i don't have one. But i have conformed that this UpdateMotors() is related to rumble for emulated wiimotes. This partially reverts commit "XInput: Apply immediately as well" (1958a10b6f5ba8348268b077f6410dadb2a20c8f) from pr # https://github.com/dolphin-emu/dolphin/pull/1560 Hopefully this fixes the xbox one controller rumble issue: https://bugs.dolphin-emu.org/issues/9071 And in theory it might reduce the used usb bandwidth, as it was originally intended before pr 1560. @JMC47: Please do a good amount of testing, to see if this breaks rumble for wiimotes or gamecube controllers emulated with xinput devices.
2016-02-06Merge pull request #3595 from Sonicadvance1/Android_headlessRyan Houdek
[Android] Headless support
2016-02-05normalize and check upper/lower bounds of hats input on OS XNick Tiberi
2016-02-05Use cmake to determine if we are enabling the Android Controller InterfaceRyan Houdek
2016-01-20[Pipe input] Make the commands locale-unawaremathieui
Setting axis values in an automated way should not be locale-aware as strtod is.
2016-01-10Comment change to reflect what code doesbooto
2016-01-06Move Android JNI bits from DolphinWX to the Android folder.Ryan Houdek
2016-01-04Android: More analog input configurationsPhatcat
Lets the user set the following in intervals of 10 between 10 and 100; - Stick/Radius (default 100,000000) - Triggers/Threshold (default 90,000000) - Tilt/Modifier/Range (default 50,000000) + mapped Tilt/Modifier button to the configurations for wiimotes & nunchuks
2015-12-24Ignored the mouse position unless the cursor is over the Dolphin window.skidau
Fixes issue 8673.
2015-12-02Wiimote + Extensions for AndroidPhatcat
2015-11-03Fix some bugs in Pipe input parsing.spxtr
If there were two commands in the buffer at once, it would only run the first because of an error in UpdateInput. If you sent the command "SET C" it would segfault because of a logic issue in ParseCommand.
2015-10-28Merge pull request #3170 from spxtr/pipesLioncash
Implemented GC Controller inputs via named pipes.
2015-10-24GC controller input using named pipesspxtr
Currently only works on unix, but can be extended to other systems. Can also be extended to do wiimotes. Searches the Pipes folder for readable named pipes and creates a dolphin input device out of them. Send controller inputs to the game by writing to the file. Commands are described in Pipes.h.
2015-10-06Added some headers to allow Dolphin to compile in my environment.catzilla4
2015-10-02InputCommon: Use NSNumber numeric literals in Obj-C codeLioncash
2015-09-26Common: Move asserts to their own headerLioncash
2015-09-17ControllerInterface: Fix -Winconsistent-missing-override warnings on OSXLioncash
2015-09-09ExpressionParser: Make all control paths return a value in operator std::stringLioncash
2015-09-05Add missing override specifiersLioncash
2015-09-05General: Remove unimplemented function prototypesLioncash
2015-08-15evdev: don't pass null path to the kernelTillmann Karras
2015-08-04Fix building with PCH disabled.Rohit Nirmal
2015-08-04Fix some warningsTillmann Karras
reorder, sign-compare, pessimizing-move
2015-08-02Stable device identifier for evdevGabriel Corona
2015-07-30Remove unnecessary virtual keywordsLioncash
2015-07-23Android: Wiimote UI Fixupsigmabeta
2015-07-21Add Wiimote support to the Android backend.Ryan Houdek
Not actually wired up to the Android UI for configuration.
2015-07-13Merge branch 'stable' into 'master'Scott Mansell
2015-07-08Fix building with PCH disabled.Rohit Nirmal
2015-07-07evdev: Delete rumble effects on the correct file descriptor.Scott Mansell
Was using m_id insted of m_fd. Also re-arrange the code so rumble effects always get deleted instead of just on stop commands.
2015-07-04evdev: fix -Wunused-private-field warningTillmann Karras
2015-07-04Merge branch 'stable'Scott Mansell
2015-07-01evdev: Support axis with ranges which extend below zero.Scott Mansell
2015-07-01Linux: Add an evdev based controller backend, to replace SDL.Scott Mansell