summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-24 18:29:55 +0100
committerLiam <byteslice@airmail.cc>2023-02-24 18:48:07 +0100
commitde4e5db3300cc77694ff154cf3e8a3ba9c9eaf78 (patch)
tree65cfc240522bc045bd5e5de3c7e6530b26c7c482 /src/core/hle/service/hid/hid.h
parentMerge pull request #9842 from german77/proper_real_mouse (diff)
downloadyuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar.gz
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar.bz2
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar.lz
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar.xz
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.tar.zst
yuzu-de4e5db3300cc77694ff154cf3e8a3ba9c9eaf78.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.h')
-rw-r--r--src/core/hle/service/hid/hid.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h
index b7c2a23ef..a397012a5 100644
--- a/src/core/hle/service/hid/hid.h
+++ b/src/core/hle/service/hid/hid.h
@@ -60,9 +60,15 @@ public:
private:
template <typename T>
void MakeController(HidController controller, u8* shared_memory) {
- controllers[static_cast<std::size_t>(controller)] =
- std::make_unique<T>(system.HIDCore(), shared_memory);
+ if constexpr (std::is_constructible_v<T, Core::System&, u8*>) {
+ controllers[static_cast<std::size_t>(controller)] =
+ std::make_unique<T>(system, shared_memory);
+ } else {
+ controllers[static_cast<std::size_t>(controller)] =
+ std::make_unique<T>(system.HIDCore(), shared_memory);
+ }
}
+
template <typename T>
void MakeControllerWithServiceContext(HidController controller, u8* shared_memory) {
controllers[static_cast<std::size_t>(controller)] =