summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorpurpasmart96 <kanzoconfigz@hotmail.com>2015-03-13 22:36:19 +0100
committerpurpasmart96 <kanzoconfigz@hotmail.com>2015-03-17 02:55:58 +0100
commit5b1757d6a519b4c35473da37ad209543590ee036 (patch)
tree8d2a53760070f53c1b2fbfa57543bb52f64a6d8d /src/core/hle/service/hid/hid.cpp
parentMerge pull request #642 from bunnei/touchpad (diff)
downloadyuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar.gz
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar.bz2
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar.lz
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar.xz
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.tar.zst
yuzu-5b1757d6a519b4c35473da37ad209543590ee036.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r--src/core/hle/service/hid/hid.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index e7f9bec7e..6a763fd51 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -114,6 +114,7 @@ void GetIPCHandles(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = 0; // No error
+ cmd_buff[2] = 0x14000000; // IPC Command Structure translate-header
// TODO(yuriks): Return error from SendSyncRequest is this fails (part of IPC marshalling)
cmd_buff[3] = Kernel::g_handle_table.Create(Service::HID::shared_mem).MoveFrom();
cmd_buff[4] = Kernel::g_handle_table.Create(Service::HID::event_pad_or_touch_1).MoveFrom();
@@ -123,6 +124,37 @@ void GetIPCHandles(Service::Interface* self) {
cmd_buff[8] = Kernel::g_handle_table.Create(Service::HID::event_debug_pad).MoveFrom();
}
+void EnableAccelerometer(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ event_accelerometer->Signal();
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+
+ LOG_WARNING(Service_HID, "(STUBBED) called");
+}
+
+void EnableGyroscopeLow(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ event_gyroscope->Signal();
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+
+ LOG_WARNING(Service_HID, "(STUBBED) called");
+}
+
+void GetSoundVolume(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ const u8 volume = 0x3F; // TODO(purpasmart): Find out if this is the max value for the volume
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = volume;
+
+ LOG_WARNING(Service_HID, "(STUBBED) called");
+}
+
void HIDInit() {
using namespace Kernel;