service: hid: Create appropriate hid resources

This commit is contained in:
Narr the Reg 2023-11-17 11:46:26 -06:00 committed by german77
parent 8da5bd27e9
commit cff2d0e19e
36 changed files with 1634 additions and 1424 deletions

View file

@ -13,14 +13,14 @@ InputInterpreter::InputInterpreter(Core::System& system)
: npad{system.ServiceManager()
.GetService<Service::HID::IHidServer>("hid")
->GetResourceManager()
->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad)} {
->GetNpad()} {
ResetButtonStates();
}
InputInterpreter::~InputInterpreter() = default;
void InputInterpreter::PollInput() {
const auto button_state = npad.GetAndResetPressState();
const auto button_state = npad->GetAndResetPressState();
previous_index = current_index;
current_index = (current_index + 1) % button_states.size();