mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-22 23:17:53 -05:00
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"
This commit is contained in:
@ -758,12 +758,11 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const {
|
||||
return hid_core.GetSupportedStyleTag();
|
||||
}
|
||||
|
||||
void Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) {
|
||||
const auto length = data.size();
|
||||
void Controller_NPad::SetSupportedNpadIdTypes(u8* data, std::size_t length) {
|
||||
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.data(), length);
|
||||
std::memcpy(supported_npad_id_types.data(), data, length);
|
||||
}
|
||||
|
||||
void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) {
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <span>
|
||||
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
@ -96,7 +95,7 @@ public:
|
||||
void SetSupportedStyleSet(Core::HID::NpadStyleTag style_set);
|
||||
Core::HID::NpadStyleTag GetSupportedStyleSet() const;
|
||||
|
||||
void SetSupportedNpadIdTypes(std::span<const u8> data);
|
||||
void SetSupportedNpadIdTypes(u8* data, std::size_t length);
|
||||
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
|
||||
std::size_t GetSupportedNpadIdTypesSize() const;
|
||||
|
||||
|
Reference in New Issue
Block a user