diff options
author | german77 <juangerman-13@hotmail.com> | 2021-12-25 19:00:11 -0600 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-01-06 21:11:27 -0600 |
commit | b94e947793dcb53e9e00ef8bf587b2f689d38d41 (patch) | |
tree | f711fb7056365911b83dd859ddb5a2971af1924c /src/core/hid/emulated_controller.cpp | |
parent | 7116a7d28bb7f0b4ecdf937d20635382e91f4b93 (diff) |
core/hid: Add home and screenshot button support
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r-- | src/core/hid/emulated_controller.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 71fc058074..9f68a41ccc 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -596,7 +596,10 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback controller.npad_button_state.right_sr.Assign(current_status.value); break; case Settings::NativeButton::Home: + controller.home_button_state.home.Assign(current_status.value); + break; case Settings::NativeButton::Screenshot: + controller.capture_button_state.capture.Assign(current_status.value); break; } } @@ -1077,6 +1080,20 @@ BatteryValues EmulatedController::GetBatteryValues() const { return controller.battery_values; } +HomeButtonState EmulatedController::GetHomeButtons() const { + if (is_configuring) { + return {}; + } + return controller.home_button_state; +} + +CaptureButtonState EmulatedController::GetCaptureButtons() const { + if (is_configuring) { + return {}; + } + return controller.capture_button_state; +} + NpadButtonState EmulatedController::GetNpadButtons() const { if (is_configuring) { return {}; |