diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-27 20:58:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 20:58:44 +0200 |
commit | 3db9a259771a44278ff34168ba140c2c7815a1cf (patch) | |
tree | e341942ba33f882468837d763004ae7de5fe0053 /src/core/hle/service/hid/controllers/npad.h | |
parent | Merge pull request #4577 from lioncash/asserts (diff) | |
parent | input_common/main: Add "/Mouse" to the display name (diff) | |
download | yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar.gz yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar.bz2 yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar.lz yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar.xz yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.tar.zst yuzu-3db9a259771a44278ff34168ba140c2c7815a1cf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 5d4c58a43..75ce5b731 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -118,10 +118,11 @@ public: std::shared_ptr<Kernel::ReadableEvent> GetStyleSetChangedEvent(u32 npad_id) const; Vibration GetLastVibration() const; - void AddNewController(NPadControllerType controller); - void AddNewControllerAt(NPadControllerType controller, u32 npad_id); + // Adds a new controller at an index. + void AddNewControllerAt(NPadControllerType controller, std::size_t npad_index); + // Adds a new controller at an index with connection status. + void UpdateControllerAt(NPadControllerType controller, std::size_t npad_index, bool connected); - void ConnectNPad(u32 npad_id); void DisconnectNPad(u32 npad_id); void SetGyroscopeZeroDriftMode(GyroscopeZeroDriftMode drift_mode); GyroscopeZeroDriftMode GetGyroscopeZeroDriftMode() const; @@ -141,6 +142,8 @@ public: // Specifically for cheat engine and other features. u32 GetAndResetPressState(); + static Controller_NPad::NPadControllerType MapSettingsTypeToNPad(Settings::ControllerType type); + static Settings::ControllerType MapNPadToSettingsType(Controller_NPad::NPadControllerType type); static std::size_t NPadIdToIndex(u32 npad_id); static u32 IndexToNPad(std::size_t index); @@ -309,7 +312,7 @@ private: bool is_connected; }; - void InitNewlyAddedControler(std::size_t controller_idx); + void InitNewlyAddedController(std::size_t controller_idx); bool IsControllerSupported(NPadControllerType controller) const; NPadControllerType DecideBestController(NPadControllerType priority) const; void RequestPadStateUpdate(u32 npad_id); |