diff options
| author | 2023-11-23 12:36:19 -0500 | |
|---|---|---|
| committer | 2023-11-23 12:36:19 -0500 | |
| commit | 0b766e4523dea156d69aab1a2a43b55f50c65071 (patch) | |
| tree | 44715eb026414d084f3f493f137b578339884a99 /src/core/hid/input_interpreter.cpp | |
| parent | Merge pull request #12123 from merryhime/explicit-this (diff) | |
| parent | service: hid: Create appropriate hid resources (diff) | |
| download | yuzu-0b766e4523dea156d69aab1a2a43b55f50c65071.tar.gz yuzu-0b766e4523dea156d69aab1a2a43b55f50c65071.tar.xz yuzu-0b766e4523dea156d69aab1a2a43b55f50c65071.zip | |
Merge pull request #12076 from german77/resource
service: hid: Create appropriate hid resources
Diffstat (limited to 'src/core/hid/input_interpreter.cpp')
| -rw-r--r-- | src/core/hid/input_interpreter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hid/input_interpreter.cpp b/src/core/hid/input_interpreter.cpp index 11359f318..a6bdd28f2 100644 --- a/src/core/hid/input_interpreter.cpp +++ b/src/core/hid/input_interpreter.cpp | |||
| @@ -13,14 +13,14 @@ InputInterpreter::InputInterpreter(Core::System& system) | |||
| 13 | : npad{system.ServiceManager() | 13 | : npad{system.ServiceManager() |
| 14 | .GetService<Service::HID::IHidServer>("hid") | 14 | .GetService<Service::HID::IHidServer>("hid") |
| 15 | ->GetResourceManager() | 15 | ->GetResourceManager() |
| 16 | ->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad)} { | 16 | ->GetNpad()} { |
| 17 | ResetButtonStates(); | 17 | ResetButtonStates(); |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | InputInterpreter::~InputInterpreter() = default; | 20 | InputInterpreter::~InputInterpreter() = default; |
| 21 | 21 | ||
| 22 | void InputInterpreter::PollInput() { | 22 | void InputInterpreter::PollInput() { |
| 23 | const auto button_state = npad.GetAndResetPressState(); | 23 | const auto button_state = npad->GetAndResetPressState(); |
| 24 | 24 | ||
| 25 | previous_index = current_index; | 25 | previous_index = current_index; |
| 26 | current_index = (current_index + 1) % button_states.size(); | 26 | current_index = (current_index + 1) % button_states.size(); |