diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2022-04-20 19:00:26 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-04-24 00:11:43 +0200 |
commit | 0f3ad939a85494a8a9bdcb6f357c774f385f647e (patch) | |
tree | 1c050188b8ffb83815adcef9fd3efd200627cb90 /src/core/hle/service/hid/controllers/npad.h | |
parent | service: hid: Access shared memory directly (diff) | |
download | yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar.gz yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar.bz2 yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar.lz yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar.xz yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.tar.zst yuzu-0f3ad939a85494a8a9bdcb6f357c774f385f647e.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 425b84abd..0a96825a5 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -187,7 +187,7 @@ public: static bool IsDeviceHandleValid(const Core::HID::VibrationDeviceHandle& device_handle); private: - static const std::size_t NPAD_COUNT = 10; + static constexpr std::size_t NPAD_COUNT = 10; // This is nn::hid::detail::ColorAttribute enum class ColorAttribute : u32 { @@ -470,9 +470,9 @@ private: }; struct NpadControllerData { - Core::HID::EmulatedController* device; Kernel::KEvent* styleset_changed_event{}; - NpadInternalState* shared_memory; + NpadInternalState* shared_memory = nullptr; + Core::HID::EmulatedController* device = nullptr; std::array<VibrationData, 2> vibration{}; bool unintended_home_button_input_protection{}; @@ -502,8 +502,7 @@ private: SixAxisSensorState sixaxis_dual_right_state{}; SixAxisSensorState sixaxis_left_lifo_state{}; SixAxisSensorState sixaxis_right_lifo_state{}; - - int callback_key; + int callback_key{}; }; void ControllerUpdate(Core::HID::ControllerTriggerType type, std::size_t controller_idx); |