summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/hid/hid.h')
-rw-r--r--src/core/hle/service/hid/hid.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h
index dc3c45aba..9563654b6 100644
--- a/src/core/hle/service/hid/hid.h
+++ b/src/core/hle/service/hid/hid.h
@@ -33,6 +33,7 @@ enum class HidController : std::size_t {
NPad,
Gesture,
ConsoleSixAxisSensor,
+ DebugMouse,
Palma,
MaxControllers,
@@ -60,9 +61,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)] =