diff options
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 9f68a41cc..6209c707e 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -351,6 +351,19 @@ void EmulatedController::DisableConfiguration() { | |||
| 351 | } | 351 | } |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | void EmulatedController::EnableSystemButtons() { | ||
| 355 | system_buttons_enabled = true; | ||
| 356 | } | ||
| 357 | |||
| 358 | void EmulatedController::DisableSystemButtons() { | ||
| 359 | system_buttons_enabled = false; | ||
| 360 | } | ||
| 361 | |||
| 362 | void EmulatedController::ResetSystemButtons() { | ||
| 363 | controller.home_button_state.home.Assign(false); | ||
| 364 | controller.capture_button_state.capture.Assign(false); | ||
| 365 | } | ||
| 366 | |||
| 354 | bool EmulatedController::IsConfiguring() const { | 367 | bool EmulatedController::IsConfiguring() const { |
| 355 | return is_configuring; | 368 | return is_configuring; |
| 356 | } | 369 | } |
| @@ -596,9 +609,15 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback | |||
| 596 | controller.npad_button_state.right_sr.Assign(current_status.value); | 609 | controller.npad_button_state.right_sr.Assign(current_status.value); |
| 597 | break; | 610 | break; |
| 598 | case Settings::NativeButton::Home: | 611 | case Settings::NativeButton::Home: |
| 612 | if (!system_buttons_enabled) { | ||
| 613 | break; | ||
| 614 | } | ||
| 599 | controller.home_button_state.home.Assign(current_status.value); | 615 | controller.home_button_state.home.Assign(current_status.value); |
| 600 | break; | 616 | break; |
| 601 | case Settings::NativeButton::Screenshot: | 617 | case Settings::NativeButton::Screenshot: |
| 618 | if (!system_buttons_enabled) { | ||
| 619 | break; | ||
| 620 | } | ||
| 602 | controller.capture_button_state.capture.Assign(current_status.value); | 621 | controller.capture_button_state.capture.Assign(current_status.value); |
| 603 | break; | 622 | break; |
| 604 | } | 623 | } |