From 2ac59bf5813ab44dc3e7f067913b0e951e8b6199 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 11 Mar 2024 01:46:33 -0500 Subject: InputCommon: Add Pipes InputBackend class. --- .../Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp index af7ad7dc6f..1a2052089e 100644 --- a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp @@ -39,7 +39,19 @@ static double StringToDouble(const std::string& text) return result; } -void PopulateDevices() +class InputBackend final : public ciface::InputBackend +{ +public: + using ciface::InputBackend::InputBackend; + void PopulateDevices() override; +}; + +std::unique_ptr CreateInputBackend(ControllerInterface* controller_interface) +{ + return std::make_unique(controller_interface); +} + +void InputBackend::PopulateDevices() { // Search the Pipes directory for files that we can open in read-only, // non-blocking mode. The device name is the virtual name of the file. -- cgit v1.2.3