mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-25 08:21:21 -08:00
Merge pull request #7524 from german77/hid_stub
service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignment
This commit is contained in:
commit
bafee97589
@ -293,8 +293,8 @@ Hid::Hid(Core::System& system_)
|
|||||||
{132, &Hid::EnableUnintendedHomeButtonInputProtection, "EnableUnintendedHomeButtonInputProtection"},
|
{132, &Hid::EnableUnintendedHomeButtonInputProtection, "EnableUnintendedHomeButtonInputProtection"},
|
||||||
{133, nullptr, "SetNpadJoyAssignmentModeSingleWithDestination"},
|
{133, nullptr, "SetNpadJoyAssignmentModeSingleWithDestination"},
|
||||||
{134, &Hid::SetNpadAnalogStickUseCenterClamp, "SetNpadAnalogStickUseCenterClamp"},
|
{134, &Hid::SetNpadAnalogStickUseCenterClamp, "SetNpadAnalogStickUseCenterClamp"},
|
||||||
{135, nullptr, "SetNpadCaptureButtonAssignment"},
|
{135, &Hid::SetNpadCaptureButtonAssignment, "SetNpadCaptureButtonAssignment"},
|
||||||
{136, nullptr, "ClearNpadCaptureButtonAssignment"},
|
{136, &Hid::ClearNpadCaptureButtonAssignment, "ClearNpadCaptureButtonAssignment"},
|
||||||
{200, &Hid::GetVibrationDeviceInfo, "GetVibrationDeviceInfo"},
|
{200, &Hid::GetVibrationDeviceInfo, "GetVibrationDeviceInfo"},
|
||||||
{201, &Hid::SendVibrationValue, "SendVibrationValue"},
|
{201, &Hid::SendVibrationValue, "SendVibrationValue"},
|
||||||
{202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"},
|
{202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"},
|
||||||
@ -1186,6 +1186,37 @@ void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Hid::SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
struct Parameters {
|
||||||
|
Core::HID::NpadStyleSet npad_styleset;
|
||||||
|
INSERT_PADDING_WORDS_NOINIT(1);
|
||||||
|
u64 applet_resource_user_id;
|
||||||
|
Core::HID::NpadButton button;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(Parameters) == 0x18, "Parameters has incorrect size.");
|
||||||
|
|
||||||
|
const auto parameters{rp.PopRaw<Parameters>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_HID,
|
||||||
|
"(STUBBED) called, npad_styleset={}, applet_resource_user_id={}, button={}",
|
||||||
|
parameters.npad_styleset, parameters.applet_resource_user_id, parameters.button);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Hid::ClearNpadCaptureButtonAssignment(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(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
||||||
|
@ -136,6 +136,8 @@ private:
|
|||||||
void IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx);
|
void IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx);
|
||||||
void EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx);
|
void EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx);
|
||||||
void SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx);
|
void SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx);
|
||||||
|
void SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx);
|
||||||
|
void ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx);
|
||||||
void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx);
|
void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx);
|
||||||
void SendVibrationValue(Kernel::HLERequestContext& ctx);
|
void SendVibrationValue(Kernel::HLERequestContext& ctx);
|
||||||
void GetActualVibrationValue(Kernel::HLERequestContext& ctx);
|
void GetActualVibrationValue(Kernel::HLERequestContext& ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user