mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
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).
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user