diff options
author | purpasmart96 <kanzoconfigz@hotmail.com> | 2015-05-23 00:55:27 +0200 |
---|---|---|
committer | purpasmart96 <kanzoconfigz@hotmail.com> | 2015-05-23 00:55:27 +0200 |
commit | 0c62b7b10642ec88e2bb892f9f857cd51e0d4514 (patch) | |
tree | cf29f5d0178f27c31985ab6827e6fa40eba3bfc1 /src/core/hle/service | |
parent | Merge pull request #798 from yuriks/y2r-bw (diff) | |
download | yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar.gz yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar.bz2 yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar.lz yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar.xz yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.tar.zst yuzu-0c62b7b10642ec88e2bb892f9f857cd51e0d4514.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 20 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 28 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid_spvr.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid_user.cpp | 4 |
4 files changed, 47 insertions, 9 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 9695f7e56..2d2133b2e 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -136,6 +136,16 @@ void EnableAccelerometer(Service::Interface* self) { LOG_WARNING(Service_HID, "(STUBBED) called"); } +void DisableAccelerometer(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(); @@ -146,6 +156,16 @@ void EnableGyroscopeLow(Service::Interface* self) { LOG_WARNING(Service_HID, "(STUBBED) called"); } +void DisableGyroscopeLow(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(); diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 897bd6764..68e2bcee0 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -162,12 +162,12 @@ const PadState PAD_CIRCLE_DOWN = {{1u << 31}}; * Outputs: * 1 : Result of function, 0 on success, otherwise error code * 2 : IPC Command Structure translate-header - * 3 : Handle to HID_User shared memory - * 4 : Event signaled by HID_User - * 5 : Event signaled by HID_User - * 6 : Event signaled by HID_User + * 3 : Handle to HID shared memory + * 4 : Event signaled by HID + * 5 : Event signaled by HID + * 6 : Event signaled by HID * 7 : Gyroscope event - * 8 : Event signaled by HID_User + * 8 : Event signaled by HID */ void GetIPCHandles(Interface* self); @@ -181,6 +181,15 @@ void GetIPCHandles(Interface* self); void EnableAccelerometer(Interface* self); /** + * HID::DisableAccelerometer service function + * Inputs: + * None + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ +void DisableAccelerometer(Interface* self); + +/** * HID::EnableGyroscopeLow service function * Inputs: * None @@ -190,6 +199,15 @@ void EnableAccelerometer(Interface* self); void EnableGyroscopeLow(Interface* self); /** + * HID::DisableGyroscopeLow service function + * Inputs: + * None + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ +void DisableGyroscopeLow(Interface* self); + +/** * HID::GetSoundVolume service function * Inputs: * None diff --git a/src/core/hle/service/hid/hid_spvr.cpp b/src/core/hle/service/hid/hid_spvr.cpp index f296b076f..02db12efd 100644 --- a/src/core/hle/service/hid/hid_spvr.cpp +++ b/src/core/hle/service/hid/hid_spvr.cpp @@ -14,9 +14,9 @@ const Interface::FunctionInfo FunctionTable[] = { {0x000B0000, nullptr, "StartAnalogStickCalibration"}, {0x000E0000, nullptr, "GetAnalogStickCalibrateParam"}, {0x00110000, EnableAccelerometer, "EnableAccelerometer"}, - {0x00120000, nullptr, "DisableAccelerometer"}, + {0x00120000, DisableAccelerometer, "DisableAccelerometer"}, {0x00130000, EnableGyroscopeLow, "EnableGyroscopeLow"}, - {0x00140000, nullptr, "DisableGyroscopeLow"}, + {0x00140000, DisableGyroscopeLow, "DisableGyroscopeLow"}, {0x00150000, nullptr, "GetGyroscopeLowRawToDpsCoefficient"}, {0x00160000, nullptr, "GetGyroscopeLowCalibrateParam"}, {0x00170000, GetSoundVolume, "GetSoundVolume"}, diff --git a/src/core/hle/service/hid/hid_user.cpp b/src/core/hle/service/hid/hid_user.cpp index 3682c9416..fbfb9e885 100644 --- a/src/core/hle/service/hid/hid_user.cpp +++ b/src/core/hle/service/hid/hid_user.cpp @@ -12,9 +12,9 @@ namespace HID { const Interface::FunctionInfo FunctionTable[] = { {0x000A0000, GetIPCHandles, "GetIPCHandles"}, {0x00110000, EnableAccelerometer, "EnableAccelerometer"}, - {0x00120000, nullptr, "DisableAccelerometer"}, + {0x00120000, DisableAccelerometer, "DisableAccelerometer"}, {0x00130000, EnableGyroscopeLow, "EnableGyroscopeLow"}, - {0x00140000, nullptr, "DisableGyroscopeLow"}, + {0x00140000, DisableGyroscopeLow, "DisableGyroscopeLow"}, {0x00150000, nullptr, "GetGyroscopeLowRawToDpsCoefficient"}, {0x00160000, nullptr, "GetGyroscopeLowCalibrateParam"}, {0x00170000, GetSoundVolume, "GetSoundVolume"}, |