summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2016-07-14 17:50:35 +0200
committerLéo Lam <leo@innovatetechnologi.es>2016-07-29 17:18:40 +0200
commit135641404af9c52e433ef28dba4f86fa208f4365 (patch)
tree8949772ef8e19ee33693426cf66ca94622993250 /Source/Core/InputCommon/ControllerInterface/evdev/evdev.h
parent3926db624d5ab2f959e67eb2369f1fe5f0f9543a (diff)
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).
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/evdev/evdev.h4
1 files changed, 4 insertions, 0 deletions
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 <string>
#include <vector>
+#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();