From 135641404af9c52e433ef28dba4f86fa208f4365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 14 Jul 2016 17:50:35 +0200 Subject: evdev: Add hotplugging support 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). --- Source/Core/InputCommon/ControllerInterface/evdev/evdev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.h') diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h index 081913fa8e..dc8e917e23 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h @@ -8,11 +8,14 @@ #include #include +#include "InputCommon/ControllerInterface/ControllerInterface.h" + namespace ciface { namespace evdev { void Init(); +void Shutdown(); class evdevDevice : public Core::Device { @@ -62,6 +65,7 @@ private: public: void UpdateInput() override; + bool IsValid() const override; evdevDevice(const std::string& devnode); ~evdevDevice(); -- cgit v1.2.3