diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2022-12-25 20:00:20 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2022-12-29 00:46:53 +0100 |
commit | e7032d9e641f99366242000fbc9ca59a55d1a95f (patch) | |
tree | bb5b6ae1d1f4bf1db9cd0d3d2b2ddcdb9336cdd6 /src/core/hle/service/hid/controllers/npad.cpp | |
parent | nvflinger: Split Parcel class into InputParcel and OutputParcel (diff) | |
download | yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar.gz yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar.bz2 yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar.lz yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar.xz yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.tar.zst yuzu-e7032d9e641f99366242000fbc9ca59a55d1a95f.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.cpp')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index df63083a8..713f8e0c6 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -737,11 +737,12 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const { return hid_core.GetSupportedStyleTag(); } -void Controller_NPad::SetSupportedNpadIdTypes(const u8* const data, std::size_t length) { +void Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) { + const auto length = data.size(); ASSERT(length > 0 && (length % sizeof(u32)) == 0); supported_npad_id_types.clear(); supported_npad_id_types.resize(length / sizeof(u32)); - std::memcpy(supported_npad_id_types.data(), data, length); + std::memcpy(supported_npad_id_types.data(), data.data(), length); } void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) { |