System: Create controllers dynamically based on config

This commit is contained in:
Connor McLaughlin
2019-12-14 23:29:26 +10:00
parent ea0845d5ad
commit c65279f944
6 changed files with 83 additions and 11 deletions

View File

@ -25,8 +25,8 @@ public:
virtual void SetButtonState(s32 button_code, bool pressed);
/// Creates a new controller of the specified type.
static std::unique_ptr<Controller> Create(std::string_view type_name);
static std::unique_ptr<Controller> Create(ControllerType type);
/// Gets the integer code for a button in the specified controller type.
static std::optional<s32> GetButtonCodeByName(std::string_view type_name, std::string_view button_name);
static std::optional<s32> GetButtonCodeByName(ControllerType type, std::string_view button_name);
};