summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hidbus
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2022-12-25 20:00:20 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2022-12-29 00:46:53 +0100
commite7032d9e641f99366242000fbc9ca59a55d1a95f (patch)
treebb5b6ae1d1f4bf1db9cd0d3d2b2ddcdb9336cdd6 /src/core/hle/service/hid/hidbus
parentnvflinger: Split Parcel class into InputParcel and OutputParcel (diff)
downloadyuzu-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/hidbus')
-rw-r--r--src/core/hle/service/hid/hidbus/hidbus_base.h3
-rw-r--r--src/core/hle/service/hid/hidbus/ringcon.cpp2
-rw-r--r--src/core/hle/service/hid/hidbus/ringcon.h3
-rw-r--r--src/core/hle/service/hid/hidbus/starlink.cpp2
-rw-r--r--src/core/hle/service/hid/hidbus/starlink.h2
-rw-r--r--src/core/hle/service/hid/hidbus/stubbed.cpp2
-rw-r--r--src/core/hle/service/hid/hidbus/stubbed.h2
7 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.h b/src/core/hle/service/hid/hidbus/hidbus_base.h
index d3960f506..65e301137 100644
--- a/src/core/hle/service/hid/hidbus/hidbus_base.h
+++ b/src/core/hle/service/hid/hidbus/hidbus_base.h
@@ -4,6 +4,7 @@
#pragma once
#include <array>
+#include <span>
#include "common/common_types.h"
#include "core/hle/result.h"
@@ -150,7 +151,7 @@ public:
}
// Assigns a command from data
- virtual bool SetCommand(const std::vector<u8>& data) {
+ virtual bool SetCommand(std::span<const u8> data) {
return {};
}
diff --git a/src/core/hle/service/hid/hidbus/ringcon.cpp b/src/core/hle/service/hid/hidbus/ringcon.cpp
index 57f1a2a26..7ab3903dc 100644
--- a/src/core/hle/service/hid/hidbus/ringcon.cpp
+++ b/src/core/hle/service/hid/hidbus/ringcon.cpp
@@ -112,7 +112,7 @@ std::vector<u8> RingController::GetReply() const {
}
}
-bool RingController::SetCommand(const std::vector<u8>& data) {
+bool RingController::SetCommand(std::span<const u8> 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 b37df50ac..8e195ca79 100644
--- a/src/core/hle/service/hid/hidbus/ringcon.h
+++ b/src/core/hle/service/hid/hidbus/ringcon.h
@@ -4,6 +4,7 @@
#pragma once
#include <array>
+#include <span>
#include "common/common_types.h"
#include "core/hle/service/hid/hidbus/hidbus_base.h"
@@ -31,7 +32,7 @@ public:
u8 GetDeviceId() const override;
// Assigns a command from data
- bool SetCommand(const std::vector<u8>& data) override;
+ bool SetCommand(std::span<const u8> data) override;
// Returns a reply from a command
std::vector<u8> GetReply() const override;
diff --git a/src/core/hle/service/hid/hidbus/starlink.cpp b/src/core/hle/service/hid/hidbus/starlink.cpp
index dd439f60a..d0e760314 100644
--- a/src/core/hle/service/hid/hidbus/starlink.cpp
+++ b/src/core/hle/service/hid/hidbus/starlink.cpp
@@ -42,7 +42,7 @@ std::vector<u8> Starlink::GetReply() const {
return {};
}
-bool Starlink::SetCommand(const std::vector<u8>& data) {
+bool Starlink::SetCommand(std::span<const u8> 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 0b1b7ba49..07c800e6e 100644
--- 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(const std::vector<u8>& data) override;
+ bool SetCommand(std::span<const u8> data) override;
// Returns a reply from a command
std::vector<u8> GetReply() const override;
diff --git a/src/core/hle/service/hid/hidbus/stubbed.cpp b/src/core/hle/service/hid/hidbus/stubbed.cpp
index e477443e3..07632c872 100644
--- a/src/core/hle/service/hid/hidbus/stubbed.cpp
+++ b/src/core/hle/service/hid/hidbus/stubbed.cpp
@@ -43,7 +43,7 @@ std::vector<u8> HidbusStubbed::GetReply() const {
return {};
}
-bool HidbusStubbed::SetCommand(const std::vector<u8>& data) {
+bool HidbusStubbed::SetCommand(std::span<const u8> 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 91165ceff..38eaa0ecc 100644
--- 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(const std::vector<u8>& data) override;
+ bool SetCommand(std::span<const u8> data) override;
// Returns a reply from a command
std::vector<u8> GetReply() const override;