summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/CoreDevice.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/CoreDevice.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
index cd8256396e..0370fce894 100644
--- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
+++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
@@ -245,5 +245,32 @@ protected:
mutable std::recursive_mutex m_devices_mutex;
std::vector<std::shared_ptr<Device>> m_devices;
};
+
+class InputDetector
+{
+public:
+ using Detection = DeviceContainer::InputDetection;
+
+ InputDetector();
+ ~InputDetector();
+
+ void Start(const DeviceContainer& container, const std::vector<std::string>& device_strings);
+ void Update(std::chrono::milliseconds initial_wait, std::chrono::milliseconds confirmation_wait,
+ std::chrono::milliseconds maximum_wait);
+ bool IsComplete() const;
+
+ const std::vector<Detection>& GetResults() const;
+
+ // move-return'd to prevent copying.
+ std::vector<Detection> TakeResults();
+
+private:
+ struct Impl;
+
+ Clock::time_point m_start_time;
+ std::vector<Detection> m_detections;
+ std::unique_ptr<Impl> m_state;
+};
+
} // namespace Core
} // namespace ciface