mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-14 09:24:57 +00:00
Merge pull request #4141 from Morph1984/SevenSixAxisSensor
hid: Stub a series of "SevenSixAxisSensor" service commands
This commit is contained in:
commit
d11baf8bf8
2 changed files with 85 additions and 21 deletions
|
@ -230,15 +230,15 @@ Hid::Hid(Core::System& system) : ServiceFramework("hid"), system(system) {
|
||||||
{211, nullptr, "IsVibrationDeviceMounted"},
|
{211, nullptr, "IsVibrationDeviceMounted"},
|
||||||
{300, &Hid::ActivateConsoleSixAxisSensor, "ActivateConsoleSixAxisSensor"},
|
{300, &Hid::ActivateConsoleSixAxisSensor, "ActivateConsoleSixAxisSensor"},
|
||||||
{301, &Hid::StartConsoleSixAxisSensor, "StartConsoleSixAxisSensor"},
|
{301, &Hid::StartConsoleSixAxisSensor, "StartConsoleSixAxisSensor"},
|
||||||
{302, nullptr, "StopConsoleSixAxisSensor"},
|
{302, &Hid::StopConsoleSixAxisSensor, "StopConsoleSixAxisSensor"},
|
||||||
{303, nullptr, "ActivateSevenSixAxisSensor"},
|
{303, &Hid::ActivateSevenSixAxisSensor, "ActivateSevenSixAxisSensor"},
|
||||||
{304, nullptr, "StartSevenSixAxisSensor"},
|
{304, &Hid::StartSevenSixAxisSensor, "StartSevenSixAxisSensor"},
|
||||||
{305, &Hid::StopSevenSixAxisSensor, "StopSevenSixAxisSensor"},
|
{305, &Hid::StopSevenSixAxisSensor, "StopSevenSixAxisSensor"},
|
||||||
{306, &Hid::InitializeSevenSixAxisSensor, "InitializeSevenSixAxisSensor"},
|
{306, &Hid::InitializeSevenSixAxisSensor, "InitializeSevenSixAxisSensor"},
|
||||||
{307, nullptr, "FinalizeSevenSixAxisSensor"},
|
{307, &Hid::FinalizeSevenSixAxisSensor, "FinalizeSevenSixAxisSensor"},
|
||||||
{308, nullptr, "SetSevenSixAxisSensorFusionStrength"},
|
{308, nullptr, "SetSevenSixAxisSensorFusionStrength"},
|
||||||
{309, nullptr, "GetSevenSixAxisSensorFusionStrength"},
|
{309, nullptr, "GetSevenSixAxisSensorFusionStrength"},
|
||||||
{310, nullptr, "ResetSevenSixAxisSensorTimestamp"},
|
{310, &Hid::ResetSevenSixAxisSensorTimestamp, "ResetSevenSixAxisSensorTimestamp"},
|
||||||
{400, nullptr, "IsUsbFullKeyControllerEnabled"},
|
{400, nullptr, "IsUsbFullKeyControllerEnabled"},
|
||||||
{401, nullptr, "EnableUsbFullKeyController"},
|
{401, nullptr, "EnableUsbFullKeyController"},
|
||||||
{402, nullptr, "IsUsbFullKeyControllerConnected"},
|
{402, nullptr, "IsUsbFullKeyControllerConnected"},
|
||||||
|
@ -374,6 +374,15 @@ void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto flags{rp.Pop<u32>()};
|
||||||
|
LOG_WARNING(Service_HID, "(STUBBED) called. flags={}", flags);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto unknown{rp.Pop<u32>()};
|
const auto unknown{rp.Pop<u32>()};
|
||||||
|
@ -413,6 +422,18 @@ void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto handle{rp.Pop<u32>()};
|
||||||
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_HID, "(STUBBED) called, handle={}, applet_resource_user_id={}", handle,
|
||||||
|
applet_resource_user_id);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto handle{rp.Pop<u32>()};
|
const auto handle{rp.Pop<u32>()};
|
||||||
|
@ -864,33 +885,35 @@ void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto handle{rp.Pop<u32>()};
|
const auto handle{rp.Pop<u32>()};
|
||||||
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, handle={}", handle);
|
LOG_WARNING(Service_HID, "(STUBBED) called, handle={}, applet_resource_user_id={}", handle,
|
||||||
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
const auto unknown{rp.Pop<u32>()};
|
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}, unknown={}",
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
applet_resource_user_id, unknown);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto unknown{rp.Pop<u32>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, unknown={}", unknown);
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
@ -914,10 +937,46 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto flags{rp.Pop<u32>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called. flags={}", flags);
|
|
||||||
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
|
applet_resource_user_id);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
|
applet_resource_user_id);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
const auto is_palma_all_connectable{rp.Pop<bool>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_HID,
|
||||||
|
"(STUBBED) called, applet_resource_user_id={}, is_palma_all_connectable={}",
|
||||||
|
applet_resource_user_id, is_palma_all_connectable);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto palma_boost_mode{rp.Pop<bool>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_HID, "(STUBBED) called, palma_boost_mode={}", palma_boost_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
|
@ -91,9 +91,11 @@ private:
|
||||||
void ActivateTouchScreen(Kernel::HLERequestContext& ctx);
|
void ActivateTouchScreen(Kernel::HLERequestContext& ctx);
|
||||||
void ActivateMouse(Kernel::HLERequestContext& ctx);
|
void ActivateMouse(Kernel::HLERequestContext& ctx);
|
||||||
void ActivateKeyboard(Kernel::HLERequestContext& ctx);
|
void ActivateKeyboard(Kernel::HLERequestContext& ctx);
|
||||||
|
void SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx);
|
||||||
void ActivateGesture(Kernel::HLERequestContext& ctx);
|
void ActivateGesture(Kernel::HLERequestContext& ctx);
|
||||||
void ActivateNpadWithRevision(Kernel::HLERequestContext& ctx);
|
void ActivateNpadWithRevision(Kernel::HLERequestContext& ctx);
|
||||||
void StartSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StartSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
|
void StopSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
||||||
void GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
||||||
void ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
||||||
|
@ -128,12 +130,15 @@ private:
|
||||||
void IsVibrationPermitted(Kernel::HLERequestContext& ctx);
|
void IsVibrationPermitted(Kernel::HLERequestContext& ctx);
|
||||||
void ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void StopSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx);
|
void ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void SetPalmaBoostMode(Kernel::HLERequestContext& ctx);
|
void StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
void SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx);
|
void FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
||||||
|
void ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx);
|
||||||
|
void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx);
|
||||||
|
void SetPalmaBoostMode(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<IAppletResource> applet_resource;
|
std::shared_ptr<IAppletResource> applet_resource;
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
|
|
Loading…
Reference in a new issue