summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2018-02-07 13:11:17 +0100
committermailwl <mailwl@gmail.com>2018-02-07 13:11:17 +0100
commit335096e19a50b38f5ccf81a3d4942a4a0e4dc546 (patch)
tree9bb1128673a0e925389bc84f39a6a934c3e1b5dd /src/core/hle/service/hid/hid.cpp
parentMerge pull request #166 from mailwl/hid-SetNpadHandhelpActivationMode (diff)
downloadyuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.gz
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.bz2
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.lz
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.xz
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.tar.zst
yuzu-335096e19a50b38f5ccf81a3d4942a4a0e4dc546.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/hid.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 3e35f5999..d757d2eae 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -9,6 +9,7 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h"
+#include "core/hle/kernel/event.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/service.h"
@@ -179,17 +180,24 @@ public:
{100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"},
{102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"},
{103, &Hid::ActivateNpad, "ActivateNpad"},
+ {106, &Hid::AcquireNpadStyleSetUpdateEventHandle,
+ "AcquireNpadStyleSetUpdateEventHandle"},
{120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"},
+ {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"},
{124, nullptr, "SetNpadJoyAssignmentModeDual"},
{128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"},
{203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"},
};
RegisterHandlers(functions);
+
+ event = Kernel::Event::Create(Kernel::ResetType::OneShot, "hid:EventHandle");
}
~Hid() = default;
private:
std::shared_ptr<IAppletResource> applet_resource;
+ u32 joy_hold_type{0};
+ Kernel::SharedPtr<Kernel::Event> event;
void CreateAppletResource(Kernel::HLERequestContext& ctx) {
if (applet_resource == nullptr) {
@@ -238,12 +246,26 @@ private:
LOG_WARNING(Service_HID, "(STUBBED) called");
}
+ void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 2, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushCopyObjects(event);
+ LOG_WARNING(Service_HID, "(STUBBED) called");
+ }
+
void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_HID, "(STUBBED) called");
}
+ void GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(joy_hold_type);
+ LOG_WARNING(Service_HID, "(STUBBED) called");
+ }
+
void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);