diff options
| author | german77 <juangerman-13@hotmail.com> | 2021-11-15 17:57:41 -0600 |
|---|---|---|
| committer | german77 <juangerman-13@hotmail.com> | 2022-01-06 21:26:05 -0600 |
| commit | 353317f31ec4cd7218c30a444486d6ded74336b3 (patch) | |
| tree | 1be3b99cfa76a7e7c360fa467d8ea6de69a29dc8 /src/core/hid/emulated_controller.cpp | |
| parent | 06d840652f855afc29a553b8ffe5a5a2ecc50580 (diff) | |
yuzu: Add controller hotkeys
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
| -rw-r--r-- | src/core/hid/emulated_controller.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 9f68a41ccc..6209c707ea 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -351,6 +351,19 @@ void EmulatedController::DisableConfiguration() { } } +void EmulatedController::EnableSystemButtons() { + system_buttons_enabled = true; +} + +void EmulatedController::DisableSystemButtons() { + system_buttons_enabled = false; +} + +void EmulatedController::ResetSystemButtons() { + controller.home_button_state.home.Assign(false); + controller.capture_button_state.capture.Assign(false); +} + bool EmulatedController::IsConfiguring() const { return is_configuring; } @@ -596,9 +609,15 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback controller.npad_button_state.right_sr.Assign(current_status.value); break; case Settings::NativeButton::Home: + if (!system_buttons_enabled) { + break; + } controller.home_button_state.home.Assign(current_status.value); break; case Settings::NativeButton::Screenshot: + if (!system_buttons_enabled) { + break; + } controller.capture_button_state.capture.Assign(current_status.value); break; } |
