diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/CoreDevice.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/CoreDevice.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h index a2176637ab..1667b42a00 100644 --- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h +++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h @@ -36,6 +36,12 @@ constexpr ControlState BATTERY_INPUT_MAX_VALUE = 100.0; namespace Core { +enum class DeviceRemoval +{ + Remove, + Keep, +}; + class Device { public: @@ -118,7 +124,7 @@ public: virtual std::string GetName() const = 0; virtual std::string GetSource() const = 0; std::string GetQualifiedName() const; - virtual void UpdateInput() {} + virtual DeviceRemoval UpdateInput() { return DeviceRemoval::Keep; } // May be overridden to implement hotplug removal. // Currently handled on a per-backend basis but this could change. @@ -242,7 +248,8 @@ public: std::recursive_mutex& GetDevicesMutex() const { return m_devices_mutex; } protected: - // Exclusively needed when reading/writing "m_devices" + // Exclusively needed when reading/writing the "m_devices" array. + // Not needed when individually readring/writing a single device ptr. mutable std::recursive_mutex m_devices_mutex; std::vector<std::shared_ptr<Device>> m_devices; }; |
