diff --git a/README.md b/README.md
index 1f78219e9..f06dd0576 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
yuzu emulator early access
=============
-This is the source code for early-access 3349.
+This is the source code for early-access 3350.
## Legal Notice
diff --git a/dist/yuzu.ico b/dist/yuzu.ico
index 7c998a5c5..df3be8464 100755
Binary files a/dist/yuzu.ico and b/dist/yuzu.ico differ
diff --git a/dist/yuzu.svg b/dist/yuzu.svg
index 98ded2d8f..93171d1bf 100755
--- a/dist/yuzu.svg
+++ b/dist/yuzu.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/common/input.h b/src/common/input.h
index 5cfacc307..1f9db5af2 100755
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -130,8 +130,6 @@ struct ButtonStatus {
bool inverted{};
// Press once to activate, press again to release
bool toggle{};
- // Spams the button when active
- bool turbo{};
// Internal lock for the toggle status
bool locked{};
};
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index b9e897f3b..b847fd4d9 100755
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -30,7 +30,7 @@ std::string ToUpper(std::string str) {
return str;
}
-std::string StringFromBuffer(std::span data) {
+std::string StringFromBuffer(const std::vector& data) {
return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
}
diff --git a/src/common/string_util.h b/src/common/string_util.h
index e03bde0a5..2ba7cadb9 100755
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -5,7 +5,6 @@
#pragma once
#include
-#include
#include
#include
#include "common/common_types.h"
@@ -18,7 +17,7 @@ namespace Common {
/// Make a string uppercase
[[nodiscard]] std::string ToUpper(std::string str);
-[[nodiscard]] std::string StringFromBuffer(std::span data);
+[[nodiscard]] std::string StringFromBuffer(const std::vector& data);
[[nodiscard]] std::string StripSpaces(const std::string& s);
[[nodiscard]] std::string StripQuotes(const std::string& s);
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ec95e3ca0..2269a9edd 100755
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -182,8 +182,6 @@ add_library(core STATIC
hle/kernel/k_auto_object_container.cpp
hle/kernel/k_auto_object_container.h
hle/kernel/k_affinity_mask.h
- hle/kernel/k_capabilities.cpp
- hle/kernel/k_capabilities.h
hle/kernel/k_class_token.cpp
hle/kernel/k_class_token.h
hle/kernel/k_client_port.cpp
diff --git a/src/core/hardware_properties.h b/src/core/hardware_properties.h
index c0d8d267e..23e20c2cc 100755
--- a/src/core/hardware_properties.h
+++ b/src/core/hardware_properties.h
@@ -25,26 +25,6 @@ constexpr std::array()> VirtualToPhysicalCoreMap{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
};
-static constexpr inline size_t NumVirtualCores = Common::BitSize();
-
-static constexpr inline u64 VirtualCoreMask = [] {
- u64 mask = 0;
- for (size_t i = 0; i < NumVirtualCores; ++i) {
- mask |= (UINT64_C(1) << i);
- }
- return mask;
-}();
-
-static constexpr inline u64 ConvertVirtualCoreMaskToPhysical(u64 v_core_mask) {
- u64 p_core_mask = 0;
- while (v_core_mask != 0) {
- const u64 next = std::countr_zero(v_core_mask);
- v_core_mask &= ~(static_cast(1) << next);
- p_core_mask |= (static_cast(1) << VirtualToPhysicalCoreMap[next]);
- }
- return p_core_mask;
-}
-
// Cortex-A57 supports 4 memory watchpoints
constexpr u64 NUM_WATCHPOINTS = 4;
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 08932ac77..3d43145a1 100755
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -687,7 +687,6 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback
}
current_status.toggle = new_status.toggle;
- current_status.turbo = new_status.turbo;
current_status.uuid = uuid;
// Update button status with current
@@ -1549,7 +1548,7 @@ NpadButtonState EmulatedController::GetNpadButtons() const {
if (is_configuring) {
return {};
}
- return {controller.npad_button_state.raw & GetTurboButtonMask()};
+ return controller.npad_button_state;
}
DebugPadButton EmulatedController::GetDebugPadButtons() const {
@@ -1657,74 +1656,4 @@ void EmulatedController::DeleteCallback(int key) {
}
callback_list.erase(iterator);
}
-
-void EmulatedController::TurboButtonUpdate() {
- turbo_button_state = !turbo_button_state;
-}
-
-NpadButton EmulatedController::GetTurboButtonMask() const {
- // Apply no mask when disabled
- if (!turbo_button_state) {
- return {NpadButton::All};
- }
-
- NpadButtonState button_mask{};
- for (std::size_t index = 0; index < controller.button_values.size(); ++index) {
- if (!controller.button_values[index].turbo) {
- continue;
- }
-
- switch (index) {
- case Settings::NativeButton::A:
- button_mask.a.Assign(1);
- break;
- case Settings::NativeButton::B:
- button_mask.b.Assign(1);
- break;
- case Settings::NativeButton::X:
- button_mask.x.Assign(1);
- break;
- case Settings::NativeButton::Y:
- button_mask.y.Assign(1);
- break;
- case Settings::NativeButton::L:
- button_mask.l.Assign(1);
- break;
- case Settings::NativeButton::R:
- button_mask.r.Assign(1);
- break;
- case Settings::NativeButton::ZL:
- button_mask.zl.Assign(1);
- break;
- case Settings::NativeButton::ZR:
- button_mask.zr.Assign(1);
- break;
- case Settings::NativeButton::DLeft:
- button_mask.left.Assign(1);
- break;
- case Settings::NativeButton::DUp:
- button_mask.up.Assign(1);
- break;
- case Settings::NativeButton::DRight:
- button_mask.right.Assign(1);
- break;
- case Settings::NativeButton::DDown:
- button_mask.down.Assign(1);
- break;
- case Settings::NativeButton::SL:
- button_mask.left_sl.Assign(1);
- button_mask.right_sl.Assign(1);
- break;
- case Settings::NativeButton::SR:
- button_mask.left_sr.Assign(1);
- button_mask.right_sr.Assign(1);
- break;
- default:
- break;
- }
- }
-
- return static_cast(~button_mask.raw);
-}
-
} // namespace Core::HID
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index 77963e32d..dd97bb817 100755
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -411,9 +411,6 @@ public:
*/
void DeleteCallback(int key);
- /// Swaps the state of the turbo buttons
- void TurboButtonUpdate();
-
private:
/// creates input devices from params
void LoadDevices();
@@ -514,8 +511,6 @@ private:
*/
void TriggerOnChange(ControllerTriggerType type, bool is_service_update);
- NpadButton GetTurboButtonMask() const;
-
const NpadIdType npad_id_type;
NpadStyleIndex npad_type{NpadStyleIndex::None};
NpadStyleIndex original_npad_type{NpadStyleIndex::None};
@@ -525,7 +520,6 @@ private:
bool system_buttons_enabled{true};
f32 motion_sensitivity{0.01f};
bool force_update_motion{false};
- bool turbo_button_state{false};
// Temporary values to avoid doing changes while the controller is in configuring mode
NpadStyleIndex tmp_npad_type{NpadStyleIndex::None};
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index 20c051364..b2879a24d 100755
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -11,7 +11,6 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/logging/log.h"
-#include "common/scratch_buffer.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_auto_object.h"
@@ -326,7 +325,7 @@ Result HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_threa
return ResultSuccess;
}
-std::vector HLERequestContext::ReadBufferCopy(std::size_t buffer_index) const {
+std::vector HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
BufferDescriptorA()[buffer_index].Size()};
if (is_buffer_a) {
@@ -346,33 +345,6 @@ std::vector HLERequestContext::ReadBufferCopy(std::size_t buffer_index) cons
}
}
-std::span HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
- static thread_local std::array, 2> read_buffer_a;
- static thread_local std::array, 2> read_buffer_x;
-
- const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
- BufferDescriptorA()[buffer_index].Size()};
- if (is_buffer_a) {
- ASSERT_OR_EXECUTE_MSG(
- BufferDescriptorA().size() > buffer_index, { return {}; },
- "BufferDescriptorA invalid buffer_index {}", buffer_index);
- auto& read_buffer = read_buffer_a[buffer_index];
- read_buffer.resize_destructive(BufferDescriptorA()[buffer_index].Size());
- memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), read_buffer.data(),
- read_buffer.size());
- return read_buffer;
- } else {
- ASSERT_OR_EXECUTE_MSG(
- BufferDescriptorX().size() > buffer_index, { return {}; },
- "BufferDescriptorX invalid buffer_index {}", buffer_index);
- auto& read_buffer = read_buffer_x[buffer_index];
- read_buffer.resize_destructive(BufferDescriptorX()[buffer_index].Size());
- memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), read_buffer.data(),
- read_buffer.size());
- return read_buffer;
- }
-}
-
std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
std::size_t buffer_index) const {
if (size == 0) {
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index 8eeeee4e1..1715c0924 100755
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -7,7 +7,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -271,11 +270,8 @@ public:
return domain_message_header.has_value();
}
- /// Helper function to get a span of a buffer using the appropriate buffer descriptor
- [[nodiscard]] std::span ReadBuffer(std::size_t buffer_index = 0) const;
-
- /// Helper function to read a copy of a buffer using the appropriate buffer descriptor
- [[nodiscard]] std::vector ReadBufferCopy(std::size_t buffer_index = 0) const;
+ /// Helper function to read a buffer using the appropriate buffer descriptor
+ [[nodiscard]] std::vector ReadBuffer(std::size_t buffer_index = 0) const;
/// Helper function to write a buffer using the appropriate buffer descriptor
std::size_t WriteBuffer(const void* buffer, std::size_t size,
diff --git a/src/core/hle/kernel/svc_types.h b/src/core/hle/kernel/svc_types.h
index 44a7a7014..06f1d219b 100755
--- a/src/core/hle/kernel/svc_types.h
+++ b/src/core/hle/kernel/svc_types.h
@@ -3,8 +3,6 @@
#pragma once
-#include
-
#include "common/common_funcs.h"
#include "common/common_types.h"
@@ -594,7 +592,4 @@ struct CreateProcessParameter {
};
static_assert(sizeof(CreateProcessParameter) == 0x30);
-constexpr size_t NumSupervisorCalls = 0xC0;
-using SvcAccessFlagSet = std::bitset;
-
} // namespace Kernel::Svc
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index d6f46e3c5..294e7692b 100755
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1124,7 +1124,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 offset{rp.Pop()};
- const auto data{ctx.ReadBuffer()};
+ const std::vector data{ctx.ReadBuffer()};
const std::size_t size{std::min(data.size(), backing.GetSize() - offset)};
LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size);
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index a0d67412e..539240842 100755
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -112,7 +112,7 @@ private:
void RequestUpdate(Kernel::HLERequestContext& ctx) {
LOG_TRACE(Service_Audio, "called");
- const auto input{ctx.ReadBuffer(0)};
+ std::vector input{ctx.ReadBuffer(0)};
// These buffers are written manually to avoid an issue with WriteBuffer throwing errors for
// checking size 0. Performance size is 0 for most games.
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp
index 5953f1c4a..4508ea821 100755
--- a/src/core/hle/service/audio/hwopus.cpp
+++ b/src/core/hle/service/audio/hwopus.cpp
@@ -93,7 +93,7 @@ private:
ctx.WriteBuffer(samples);
}
- bool DecodeOpusData(u32& consumed, u32& sample_count, std::span input,
+ bool DecodeOpusData(u32& consumed, u32& sample_count, const std::vector& input,
std::vector& output, u64* out_performance_time) const {
const auto start_time = std::chrono::steady_clock::now();
const std::size_t raw_output_sz = output.size() * sizeof(opus_int16);
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp
index 1447688b4..c62f53b3d 100755
--- a/src/core/hle/service/es/es.cpp
+++ b/src/core/hle/service/es/es.cpp
@@ -122,7 +122,7 @@ private:
void ImportTicket(Kernel::HLERequestContext& ctx) {
const auto ticket = ctx.ReadBuffer();
- [[maybe_unused]] const auto cert = ctx.ReadBuffer(1);
+ const auto cert = ctx.ReadBuffer(1);
if (ticket.size() < sizeof(Core::Crypto::Ticket)) {
LOG_ERROR(Service_ETicket, "The input buffer is not large enough!");
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 34af9fd94..779072def 100755
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -190,7 +190,7 @@ private:
return;
}
- const auto data = ctx.ReadBuffer();
+ const std::vector data = ctx.ReadBuffer();
ASSERT_MSG(
static_cast(data.size()) <= length,
@@ -401,8 +401,11 @@ public:
}
void RenameFile(Kernel::HLERequestContext& ctx) {
- const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0));
- const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1));
+ std::vector buffer = ctx.ReadBuffer(0);
+ const std::string src_name = Common::StringFromBuffer(buffer);
+
+ buffer = ctx.ReadBuffer(1);
+ const std::string dst_name = Common::StringFromBuffer(buffer);
LOG_DEBUG(Service_FS, "called. file '{}' to file '{}'", src_name, dst_name);
diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp
index a33de8166..03bd04f1a 100755
--- a/src/core/hle/service/glue/arp.cpp
+++ b/src/core/hle/service/glue/arp.cpp
@@ -228,8 +228,7 @@ private:
return;
}
- // TODO: Can this be a span?
- control = ctx.ReadBufferCopy();
+ control = ctx.ReadBuffer();
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index d2ac820a6..6b09bbf25 100755
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -428,9 +428,6 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
return;
}
- // This function is unique to yuzu for the turbo buttons to work properly
- controller.device->TurboButtonUpdate();
-
auto& pad_entry = controller.npad_pad_state;
auto& trigger_entry = controller.npad_trigger_state;
const auto button_state = controller.device->GetNpadButtons();
@@ -758,12 +755,11 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const {
return hid_core.GetSupportedStyleTag();
}
-void Controller_NPad::SetSupportedNpadIdTypes(std::span 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) {
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 968d671ac..cfcc27222 100755
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -6,7 +6,6 @@
#include
#include
#include
-#include
#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 data);
+ void SetSupportedNpadIdTypes(u8* data, std::size_t length);
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
std::size_t GetSupportedNpadIdTypesSize() const;
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 1944ae64f..224d9f86a 100755
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -1026,7 +1026,7 @@ void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) {
const auto applet_resource_user_id{rp.Pop()};
applet_resource->GetController(HidController::NPad)
- .SetSupportedNpadIdTypes(ctx.ReadBuffer());
+ .SetSupportedNpadIdTypes(ctx.ReadBuffer().data(), ctx.GetReadBufferSize());
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
@@ -2104,7 +2104,7 @@ void Hid::WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx) {
const auto connection_handle{rp.PopRaw()};
const auto unknown{rp.Pop()};
- [[maybe_unused]] const auto buffer = ctx.ReadBuffer();
+ const auto buffer = ctx.ReadBuffer();
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, unknown={}",
connection_handle.npad_id, unknown);
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.h b/src/core/hle/service/hid/hidbus/hidbus_base.h
index 9258b73d6..ff5c56c9a 100755
--- a/src/core/hle/service/hid/hidbus/hidbus_base.h
+++ b/src/core/hle/service/hid/hidbus/hidbus_base.h
@@ -4,7 +4,6 @@
#pragma once
#include
-#include
#include "common/common_types.h"
#include "core/hle/result.h"
@@ -151,7 +150,7 @@ public:
}
// Assigns a command from data
- virtual bool SetCommand(std::span data) {
+ virtual bool SetCommand(const std::vector& data) {
return {};
}
diff --git a/src/core/hle/service/hid/hidbus/ringcon.cpp b/src/core/hle/service/hid/hidbus/ringcon.cpp
index 8181531d7..2b8615ecc 100755
--- a/src/core/hle/service/hid/hidbus/ringcon.cpp
+++ b/src/core/hle/service/hid/hidbus/ringcon.cpp
@@ -116,7 +116,7 @@ std::vector RingController::GetReply() const {
}
}
-bool RingController::SetCommand(std::span data) {
+bool RingController::SetCommand(const std::vector& data) {
if (data.size() < 4) {
LOG_ERROR(Service_HID, "Command size not supported {}", data.size());
command = RingConCommands::Error;
diff --git a/src/core/hle/service/hid/hidbus/ringcon.h b/src/core/hle/service/hid/hidbus/ringcon.h
index 1a7b477af..e6e3b6572 100755
--- a/src/core/hle/service/hid/hidbus/ringcon.h
+++ b/src/core/hle/service/hid/hidbus/ringcon.h
@@ -4,7 +4,6 @@
#pragma once
#include
-#include
#include "common/common_types.h"
#include "core/hle/service/hid/hidbus/hidbus_base.h"
@@ -32,7 +31,7 @@ public:
u8 GetDeviceId() const override;
// Assigns a command from data
- bool SetCommand(std::span data) override;
+ bool SetCommand(const std::vector& data) override;
// Returns a reply from a command
std::vector GetReply() const override;
diff --git a/src/core/hle/service/hid/hidbus/starlink.cpp b/src/core/hle/service/hid/hidbus/starlink.cpp
index 3d74eaafd..6d1d01629 100755
--- a/src/core/hle/service/hid/hidbus/starlink.cpp
+++ b/src/core/hle/service/hid/hidbus/starlink.cpp
@@ -42,7 +42,7 @@ std::vector Starlink::GetReply() const {
return {};
}
-bool Starlink::SetCommand(std::span data) {
+bool Starlink::SetCommand(const std::vector& data) {
LOG_ERROR(Service_HID, "Command not implemented");
return false;
}
diff --git a/src/core/hle/service/hid/hidbus/starlink.h b/src/core/hle/service/hid/hidbus/starlink.h
index bbde84384..9be7d54c1 100755
--- a/src/core/hle/service/hid/hidbus/starlink.h
+++ b/src/core/hle/service/hid/hidbus/starlink.h
@@ -29,7 +29,7 @@ public:
u8 GetDeviceId() const override;
// Assigns a command from data
- bool SetCommand(std::span data) override;
+ bool SetCommand(const std::vector& data) override;
// Returns a reply from a command
std::vector GetReply() const override;
diff --git a/src/core/hle/service/hid/hidbus/stubbed.cpp b/src/core/hle/service/hid/hidbus/stubbed.cpp
index c4215443c..7489d50cb 100755
--- a/src/core/hle/service/hid/hidbus/stubbed.cpp
+++ b/src/core/hle/service/hid/hidbus/stubbed.cpp
@@ -43,7 +43,7 @@ std::vector HidbusStubbed::GetReply() const {
return {};
}
-bool HidbusStubbed::SetCommand(std::span data) {
+bool HidbusStubbed::SetCommand(const std::vector& data) {
LOG_ERROR(Service_HID, "Command not implemented");
return false;
}
diff --git a/src/core/hle/service/hid/hidbus/stubbed.h b/src/core/hle/service/hid/hidbus/stubbed.h
index 0772bc6ee..0130707a9 100755
--- a/src/core/hle/service/hid/hidbus/stubbed.h
+++ b/src/core/hle/service/hid/hidbus/stubbed.h
@@ -29,7 +29,7 @@ public:
u8 GetDeviceId() const override;
// Assigns a command from data
- bool SetCommand(std::span data) override;
+ bool SetCommand(const std::vector& data) override;
// Returns a reply from a command
std::vector GetReply() const override;
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp
index ec162fd31..a6369d52a 100755
--- a/src/core/hle/service/jit/jit.cpp
+++ b/src/core/hle/service/jit/jit.cpp
@@ -62,7 +62,7 @@ public:
const auto parameters{rp.PopRaw()};
// Optional input/output buffers
- const auto input_buffer{ctx.CanReadBuffer() ? ctx.ReadBuffer() : std::span()};
+ std::vector input_buffer{ctx.CanReadBuffer() ? ctx.ReadBuffer() : std::vector()};
std::vector output_buffer(ctx.CanWriteBuffer() ? ctx.GetWriteBufferSize() : 0);
// Function call prototype:
@@ -132,7 +132,7 @@ public:
const auto command{rp.PopRaw()};
// Optional input/output buffers
- const auto input_buffer{ctx.CanReadBuffer() ? ctx.ReadBuffer() : std::span()};
+ std::vector input_buffer{ctx.CanReadBuffer() ? ctx.ReadBuffer() : std::vector()};
std::vector output_buffer(ctx.CanWriteBuffer() ? ctx.GetWriteBufferSize() : 0);
// Function call prototype:
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp
index edd170132..a5ff82944 100755
--- a/src/core/hle/service/ldn/ldn.cpp
+++ b/src/core/hle/service/ldn/ldn.cpp
@@ -427,7 +427,7 @@ public:
}
void SetAdvertiseData(Kernel::HLERequestContext& ctx) {
- const auto read_buffer = ctx.ReadBuffer();
+ std::vector read_buffer = ctx.ReadBuffer();
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(lan_discovery.SetAdvertiseData(read_buffer));
@@ -479,7 +479,7 @@ public:
parameters.security_config.passphrase_size,
parameters.security_config.security_mode, parameters.local_communication_version);
- const auto read_buffer = ctx.ReadBuffer();
+ const std::vector read_buffer = ctx.ReadBuffer();
if (read_buffer.size() != sizeof(NetworkInfo)) {
LOG_ERROR(Frontend, "NetworkInfo doesn't match read_buffer size!");
IPC::ResponseBuilder rb{ctx, 2};
diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h
index 607d303d7..4020821b3 100755
--- a/src/core/hle/service/nvdrv/devices/nvdevice.h
+++ b/src/core/hle/service/nvdrv/devices/nvdevice.h
@@ -3,9 +3,7 @@
#pragma once
-#include
#include
-
#include "common/common_types.h"
#include "core/hle/service/nvdrv/nvdata.h"
@@ -33,7 +31,7 @@ public:
* @param output A buffer where the output data will be written to.
* @returns The result code of the ioctl.
*/
- virtual NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+ virtual NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) = 0;
/**
@@ -44,8 +42,8 @@ public:
* @param output A buffer where the output data will be written to.
* @returns The result code of the ioctl.
*/
- virtual NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) = 0;
+ virtual NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector& inline_input, std::vector& output) = 0;
/**
* Handles an ioctl3 request.
@@ -55,7 +53,7 @@ public:
* @param inline_output A buffer where the inlined output data will be written to.
* @returns The result code of the ioctl.
*/
- virtual NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input,
+ virtual NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output, std::vector& inline_output) = 0;
/**
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index 0b4bb7bcb..6ddd40e85 100755
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -17,19 +17,19 @@ nvdisp_disp0::nvdisp_disp0(Core::System& system_, NvCore::Container& core)
: nvdevice{system_}, container{core}, nvmap{core.GetNvMapFile()} {}
nvdisp_disp0::~nvdisp_disp0() = default;
-NvResult nvdisp_disp0::Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+NvResult nvdisp_disp0::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) {
UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
return NvResult::NotImplemented;
}
-NvResult nvdisp_disp0::Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) {
+NvResult nvdisp_disp0::Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector& inline_input, std::vector& output) {
UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
return NvResult::NotImplemented;
}
-NvResult nvdisp_disp0::Ioctl3(DeviceFD fd, Ioctl command, std::span input,
+NvResult nvdisp_disp0::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output, std::vector& inline_output) {
UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
return NvResult::NotImplemented;
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
index 7e09e3331..e420efb4f 100755
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h
@@ -25,12 +25,12 @@ public:
explicit nvdisp_disp0(Core::System& system_, NvCore::Container& core);
~nvdisp_disp0() override;
- NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+ NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) override;
- NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) override;
- NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output,
- std::vector& inline_output) override;
+ NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector& inline_input, std::vector& output) override;
+ NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input,
+ std::vector& output, std::vector& inline_output) override;
void OnOpen(DeviceFD fd) override;
void OnClose(DeviceFD fd) override;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
index ad4fab423..72a4d18eb 100755
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
@@ -27,7 +27,7 @@ nvhost_as_gpu::nvhost_as_gpu(Core::System& system_, Module& module_, NvCore::Con
nvhost_as_gpu::~nvhost_as_gpu() = default;
-NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) {
switch (command.group) {
case 'A':
@@ -60,13 +60,13 @@ NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span i
return NvResult::NotImplemented;
}
-NvResult nvhost_as_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) {
+NvResult nvhost_as_gpu::Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector& inline_input, std::vector& output) {
UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
return NvResult::NotImplemented;
}
-NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span input,
+NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output, std::vector& inline_output) {
switch (command.group) {
case 'A':
@@ -87,7 +87,7 @@ NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span i
void nvhost_as_gpu::OnOpen(DeviceFD fd) {}
void nvhost_as_gpu::OnClose(DeviceFD fd) {}
-NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::AllocAsEx(const std::vector& input, std::vector& output) {
IoctlAllocAsEx params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -141,7 +141,7 @@ NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::vector& ou
return NvResult::Success;
}
-NvResult nvhost_as_gpu::AllocateSpace(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::AllocateSpace(const std::vector& input, std::vector& output) {
IoctlAllocSpace params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -220,7 +220,7 @@ void nvhost_as_gpu::FreeMappingLocked(u64 offset) {
mapping_map.erase(offset);
}
-NvResult nvhost_as_gpu::FreeSpace(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::FreeSpace(const std::vector& input, std::vector& output) {
IoctlFreeSpace params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -266,7 +266,7 @@ NvResult nvhost_as_gpu::FreeSpace(std::span input, std::vector& ou
return NvResult::Success;
}
-NvResult nvhost_as_gpu::Remap(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::Remap(const std::vector& input, std::vector& output) {
const auto num_entries = input.size() / sizeof(IoctlRemapEntry);
LOG_DEBUG(Service_NVDRV, "called, num_entries=0x{:X}", num_entries);
@@ -320,7 +320,7 @@ NvResult nvhost_as_gpu::Remap(std::span input, std::vector& output
return NvResult::Success;
}
-NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::MapBufferEx(const std::vector& input, std::vector& output) {
IoctlMapBufferEx params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -424,7 +424,7 @@ NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::vector&
return NvResult::Success;
}
-NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::UnmapBuffer(const std::vector& input, std::vector& output) {
IoctlUnmapBuffer params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -463,7 +463,7 @@ NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::vector&
return NvResult::Success;
}
-NvResult nvhost_as_gpu::BindChannel(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::BindChannel(const std::vector& input, std::vector& output) {
IoctlBindChannel params{};
std::memcpy(¶ms, input.data(), input.size());
LOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd);
@@ -492,7 +492,7 @@ void nvhost_as_gpu::GetVARegionsImpl(IoctlGetVaRegions& params) {
};
}
-NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector& output) {
+NvResult nvhost_as_gpu::GetVARegions(const std::vector& input, std::vector& output) {
IoctlGetVaRegions params{};
std::memcpy(¶ms, input.data(), input.size());
@@ -511,7 +511,7 @@ NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector&
return NvResult::Success;
}
-NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector& output,
+NvResult nvhost_as_gpu::GetVARegions(const std::vector& input, std::vector& output,
std::vector& inline_output) {
IoctlGetVaRegions params{};
std::memcpy(¶ms, input.data(), input.size());
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index dcfc02419..57b6a1f76 100755
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -47,12 +47,12 @@ public:
explicit nvhost_as_gpu(Core::System& system_, Module& module, NvCore::Container& core);
~nvhost_as_gpu() override;
- NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+ NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) override;
- NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) override;
- NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output,
- std::vector& inline_output) override;
+ NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector& inline_input, std::vector& output) override;
+ NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input,
+ std::vector& output, std::vector& inline_output) override;
void OnOpen(DeviceFD fd) override;
void OnClose(DeviceFD fd) override;
@@ -138,17 +138,17 @@ private:
static_assert(sizeof(IoctlGetVaRegions) == 16 + sizeof(VaRegion) * 2,
"IoctlGetVaRegions is incorrect size");
- NvResult AllocAsEx(std::span input, std::vector& output);
- NvResult AllocateSpace(std::span input, std::vector& output);
- NvResult Remap(std::span input, std::vector& output);
- NvResult MapBufferEx(std::span input, std::vector& output);
- NvResult UnmapBuffer(std::span input, std::vector& output);
- NvResult FreeSpace(std::span input, std::vector& output);
- NvResult BindChannel(std::span input, std::vector& output);
+ NvResult AllocAsEx(const std::vector& input, std::vector& output);
+ NvResult AllocateSpace(const std::vector& input, std::vector& output);
+ NvResult Remap(const std::vector& input, std::vector& output);
+ NvResult MapBufferEx(const std::vector& input, std::vector& output);
+ NvResult UnmapBuffer(const std::vector& input, std::vector& output);
+ NvResult FreeSpace(const std::vector& input, std::vector& output);
+ NvResult BindChannel(const std::vector& input, std::vector& output);
void GetVARegionsImpl(IoctlGetVaRegions& params);
- NvResult GetVARegions(std::span input, std::vector& output);
- NvResult GetVARegions(std::span input, std::vector& output,
+ NvResult GetVARegions(const std::vector& input, std::vector& output);
+ NvResult GetVARegions(const std::vector& input, std::vector& output,
std::vector& inline_output);
void FreeMappingLocked(u64 offset);
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
index c2091af86..c6ab1447c 100755
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
@@ -34,7 +34,7 @@ nvhost_ctrl::~nvhost_ctrl() {
}
}
-NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span input,
+NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input,
std::vector& output) {
switch (command.group) {
case 0x0:
@@ -63,13 +63,13 @@ NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span inp
return NvResult::NotImplemented;
}
-NvResult nvhost_ctrl::Ioctl2(DeviceFD fd, Ioctl command, std::span input,
- std::span inline_input, std::vector& output) {
+NvResult nvhost_ctrl::Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input,
+ const std::vector