HostInterface: Support per-controller-type settings

This commit is contained in:
Connor McLaughlin
2020-07-01 00:33:45 +10:00
parent f3b2953e40
commit 4dc9e10777
17 changed files with 247 additions and 7 deletions

View File

@ -3,8 +3,8 @@
#include "common/state_wrapper.h"
#include "digital_controller.h"
#include "namco_guncon.h"
#include "playstation_mouse.h"
#include "negcon.h"
#include "playstation_mouse.h"
Controller::Controller() = default;
@ -39,6 +39,8 @@ float Controller::GetVibrationMotorStrength(u32 motor)
return 0.0f;
}
void Controller::LoadSettings(HostInterface* host_interface, const char* section) {}
std::unique_ptr<Controller> Controller::Create(System* system, ControllerType type, u32 index)
{
switch (type)
@ -198,3 +200,15 @@ std::optional<s32> Controller::GetButtonCodeByName(ControllerType type, std::str
return std::nullopt;
}
}
Controller::SettingList Controller::GetSettings(ControllerType type)
{
switch (type)
{
case ControllerType::AnalogController:
return AnalogController::StaticGetSettings();
default:
return {};
}
}