Add evdev controller interface
This commit is contained in:
@ -95,6 +95,9 @@ static constexpr std::array<const char*, static_cast<u32>(ControllerInterface::B
|
||||
// Deliberately not translated as it's not exposed to users.
|
||||
"Android",
|
||||
#endif
|
||||
#ifdef WITH_EVDEV
|
||||
TRANSLATABLE("ControllerInterface", "Evdev"),
|
||||
#endif
|
||||
}};
|
||||
|
||||
std::optional<ControllerInterface::Backend> ControllerInterface::ParseBackendName(const char* name)
|
||||
@ -132,6 +135,9 @@ ControllerInterface::Backend ControllerInterface::GetDefaultBackend()
|
||||
#include "dinput_controller_interface.h"
|
||||
#include "xinput_controller_interface.h"
|
||||
#endif
|
||||
#ifdef WITH_EVDEV
|
||||
#include "evdev_controller_interface.h"
|
||||
#endif
|
||||
|
||||
std::unique_ptr<ControllerInterface> ControllerInterface::Create(Backend type)
|
||||
{
|
||||
@ -145,6 +151,10 @@ std::unique_ptr<ControllerInterface> ControllerInterface::Create(Backend type)
|
||||
if (type == Backend::DInput)
|
||||
return std::make_unique<DInputControllerInterface>();
|
||||
#endif
|
||||
#ifdef WITH_EVDEV
|
||||
if (type == Backend::Evdev)
|
||||
return std::make_unique<EvdevControllerInterface>();
|
||||
#endif
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user