diff options
author | bunnei <bunneidev@gmail.com> | 2015-05-23 02:44:22 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-23 02:44:22 +0200 |
commit | 41531eeb32ef86f4b04af2f5fda85148a87c56ad (patch) | |
tree | 3f12c15d76dcf88b1a049652dad31de86bd6fb39 /src/core/hle | |
parent | Merge pull request #803 from lioncash/typo (diff) | |
parent | HID: Stub DisableAccelerometer and DisableGyroscopeLow (diff) | |
download | yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar.gz yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar.bz2 yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar.lz yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar.xz yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.tar.zst yuzu-41531eeb32ef86f4b04af2f5fda85148a87c56ad.zip |
Diffstat (limited to 'src/core/hle')
-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"}, |