summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/evdev
AgeCommit message (Collapse)Author
2016-12-26evdev: reduce startup timeTillmann Karras
GetName() creates a new evdev device which calls tons of ioctls. But the main culprit is close() which for input devices appears to be a slow path in the kernel. This commit reduces PopulateDevices() by 50% on my laptop, but ~730 ms is still ridiculously slow for something that isn't needed right away.
2016-12-05evdev: set flag in a thread-safe wayTillmann Karras
2016-12-05evdev: fix shutdown hangTillmann Karras
Note: This probably means our approach of populating from udev isn't safe to be called multiple times.
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-10-23Fix -Wunused-result warningsLéo Lam
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-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-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-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-09-26Common: Move asserts to their own headerLioncash
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-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-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