diff options
| author | JMC47 <JMC4789@gmail.com> | 2020-01-13 18:30:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-13 18:30:29 -0500 |
| commit | d5dcd91c948c5ae97564190fc05549dfd5834107 (patch) | |
| tree | f57f8698ff5523e3f8a4c17383f04ccc1e964f0e /Source/Core/InputCommon/ControllerInterface/evdev/evdev.h | |
| parent | da59f97278561e0645149fcd8eb8b24c77f51538 (diff) | |
| parent | e2d5c92c76b837e3e4935812c7ffde3be5fa7a91 (diff) | |
Merge pull request #8473 from jordan-woyak/evdev-combine
ControllerInterface: Combine evdev devices with the same unique ID.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/evdev/evdev.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h index f4b095558b..3c60e2cb57 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.h @@ -76,18 +76,26 @@ public: void UpdateInput() override; bool IsValid() const override; - evdevDevice(const std::string& devnode); ~evdevDevice(); + // Return true if node was "interesting". + bool AddNode(std::string devnode, int fd, libevdev* dev); + + const char* GetUniqueID() const; + std::string GetName() const override { return m_name; } std::string GetSource() const override { return "evdev"; } - bool IsInteresting() const { return m_interesting; } private: - const std::string m_devfile; - int m_fd; - libevdev* m_dev; std::string m_name; - bool m_interesting = false; + + struct Node + { + std::string devnode; + int fd; + libevdev* device; + }; + + std::vector<Node> m_nodes; }; } // namespace ciface::evdev |
