diff options
| author | 2021-10-19 00:12:24 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:24 -0600 | |
| commit | 601ac43495904f3f7666d79a800a8b4eda5a8461 (patch) | |
| tree | 97e49cb22264ceb730ce51babbd3c2dc27d6b36f /src/core/hid/emulated_controller.h | |
| parent | hid: Fix controller connection/disconnection (diff) | |
| download | yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.gz yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.tar.xz yuzu-601ac43495904f3f7666d79a800a8b4eda5a8461.zip | |
core/hid: Only signal when needed
Diffstat (limited to 'src/core/hid/emulated_controller.h')
| -rw-r--r-- | src/core/hid/emulated_controller.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index 6a6dc1892..3a0b20cf8 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h | |||
| @@ -113,6 +113,7 @@ enum class ControllerTriggerType { | |||
| 113 | 113 | ||
| 114 | struct ControllerUpdateCallback { | 114 | struct ControllerUpdateCallback { |
| 115 | std::function<void(ControllerTriggerType)> on_change; | 115 | std::function<void(ControllerTriggerType)> on_change; |
| 116 | bool is_service; | ||
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 118 | class EmulatedController { | 119 | class EmulatedController { |
| @@ -325,9 +326,10 @@ private: | |||
| 325 | 326 | ||
| 326 | /** | 327 | /** |
| 327 | * Triggers a callback that something has changed on the controller status | 328 | * Triggers a callback that something has changed on the controller status |
| 328 | * @param Input type of the event to trigger | 329 | * @param type: Input type of the event to trigger |
| 330 | * @param is_service_update: indicates if this event should be sended to only services | ||
| 329 | */ | 331 | */ |
| 330 | void TriggerOnChange(ControllerTriggerType type); | 332 | void TriggerOnChange(ControllerTriggerType type, bool is_service_update); |
| 331 | 333 | ||
| 332 | NpadIdType npad_id_type; | 334 | NpadIdType npad_id_type; |
| 333 | NpadType npad_type{NpadType::None}; | 335 | NpadType npad_type{NpadType::None}; |