|
|
@@ -211,6 +211,18 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr<ResourceManager> r
|
|
|
|
{1002, &IHidServer::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"},
|
|
|
|
{1002, &IHidServer::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"},
|
|
|
|
{1003, &IHidServer::IsFirmwareUpdateNeededForNotification, "IsFirmwareUpdateNeededForNotification"},
|
|
|
|
{1003, &IHidServer::IsFirmwareUpdateNeededForNotification, "IsFirmwareUpdateNeededForNotification"},
|
|
|
|
{2000, nullptr, "ActivateDigitizer"},
|
|
|
|
{2000, nullptr, "ActivateDigitizer"},
|
|
|
|
|
|
|
|
{3000, nullptr, "GetDebugPadGenericPadMap"},
|
|
|
|
|
|
|
|
{3001, nullptr, "SetDebugPadGenericPadMap"},
|
|
|
|
|
|
|
|
{3002, nullptr, "ResetDebugPadGenericPadMap"},
|
|
|
|
|
|
|
|
{3003, nullptr, "GetDebugPadKeyboardMap"},
|
|
|
|
|
|
|
|
{3004, nullptr, "SetDebugPadKeyboardMap"},
|
|
|
|
|
|
|
|
{3005, nullptr, "ResetDebugPadKeyboardMap"},
|
|
|
|
|
|
|
|
{3006, nullptr, "GetFullKeyGenericPadMap"},
|
|
|
|
|
|
|
|
{3007, nullptr, "SetFullKeyGenericPadMap"},
|
|
|
|
|
|
|
|
{3008, nullptr, "ResetFullKeyGenericPadMap"},
|
|
|
|
|
|
|
|
{3009, nullptr, "GetFullKeyKeyboardMap"},
|
|
|
|
|
|
|
|
{3010, nullptr, "SetFullKeyKeyboardMap"},
|
|
|
|
|
|
|
|
{3011, nullptr, "ResetFullKeyKeyboardMap"},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
|
|
|
@@ -2053,7 +2065,6 @@ void IHidServer::EndPermitVibrationSession(HLERequestContext& ctx) {}
|
|
|
|
void IHidServer::IsVibrationDeviceMounted(HLERequestContext& ctx) {}
|
|
|
|
void IHidServer::IsVibrationDeviceMounted(HLERequestContext& ctx) {}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SendVibrationValueInBool(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SendVibrationValueInBool(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
struct Parameters {
|
|
|
|
struct Parameters {
|
|
|
|
VibrationDeviceHandle handle;
|
|
|
|
VibrationDeviceHandle handle;
|
|
|
@@ -2154,7 +2165,7 @@ void IHidServer::InitializePalma(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->Initialize(connection_handle);
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->Initialize(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2168,10 +2179,10 @@ void IHidServer::AcquirePalmaOperationCompleteEvent(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
Kernel::KReadableEvent* out_event = nullptr;
|
|
|
|
Kernel::KReadableEvent* out_event = nullptr;
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->AcquirePalmaOperationCompleteEvent(
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->AcquirePalmaOperationCompleteEvent(
|
|
|
|
connection_handle, &out_event);
|
|
|
|
connection_handle.npad_id, &out_event);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
rb.PushCopyObjects(out_event);
|
|
|
|
rb.PushCopyObjects(out_event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@@ -2183,18 +2194,16 @@ void IHidServer::GetPalmaOperationInfo(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
PalmaOperationType operation_type{};
|
|
|
|
PalmaOperationType operation_type{};
|
|
|
|
PalmaOperationData data{};
|
|
|
|
PalmaOperationData data{};
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->GetPalmaOperationInfo(
|
|
|
|
const Result result = GetResourceManager()->GetPalma()->GetPalmaOperationInfo(
|
|
|
|
connection_handle, operation_type, data);
|
|
|
|
connection_handle.npad_id, operation_type, data);
|
|
|
|
|
|
|
|
|
|
|
|
if (result.IsError()) {
|
|
|
|
if (result.IsSuccess()) {
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
ctx.WriteBuffer(data);
|
|
|
|
rb.Push(result);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ctx.WriteBuffer(data);
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 4};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 4};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(static_cast<u64>(operation_type));
|
|
|
|
rb.PushEnum(operation_type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::PlayPalmaActivity(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::PlayPalmaActivity(HLERequestContext& ctx) {
|
|
|
@@ -2205,8 +2214,8 @@ void IHidServer::PlayPalmaActivity(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, palma_activity={}",
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, palma_activity={}",
|
|
|
|
connection_handle.npad_id, palma_activity);
|
|
|
|
connection_handle.npad_id, palma_activity);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->PlayPalmaActivity(
|
|
|
|
GetResourceManager()->GetPalma()->PlayPalmaActivity(connection_handle, palma_activity);
|
|
|
|
connection_handle.npad_id, palma_activity);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2221,7 +2230,7 @@ void IHidServer::SetPalmaFrModeType(HLERequestContext& ctx) {
|
|
|
|
connection_handle.npad_id, fr_mode);
|
|
|
|
connection_handle.npad_id, fr_mode);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
const auto result =
|
|
|
|
GetResourceManager()->GetPalma()->SetPalmaFrModeType(connection_handle, fr_mode);
|
|
|
|
GetResourceManager()->GetPalma()->SetPalmaFrModeType(connection_handle.npad_id, fr_mode);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2233,7 +2242,7 @@ void IHidServer::ReadPalmaStep(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ReadPalmaStep(connection_handle);
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ReadPalmaStep(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2254,7 +2263,7 @@ void IHidServer::EnablePalmaStep(HLERequestContext& ctx) {
|
|
|
|
parameters.connection_handle.npad_id, parameters.is_enabled);
|
|
|
|
parameters.connection_handle.npad_id, parameters.is_enabled);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->EnablePalmaStep(
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->EnablePalmaStep(
|
|
|
|
parameters.connection_handle, parameters.is_enabled);
|
|
|
|
parameters.connection_handle.npad_id, parameters.is_enabled);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2266,15 +2275,44 @@ void IHidServer::ResetPalmaStep(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ResetPalmaStep(connection_handle);
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ResetPalmaStep(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::ReadPalmaApplicationSection(HLERequestContext& ctx) {}
|
|
|
|
void IHidServer::ReadPalmaApplicationSection(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
|
|
|
|
const auto starting_index{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto size{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::WritePalmaApplicationSection(HLERequestContext& ctx) {}
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, starting_index={}, size={}",
|
|
|
|
|
|
|
|
connection_handle.npad_id, starting_index, size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ReadPalmaApplicationSection(
|
|
|
|
|
|
|
|
connection_handle.npad_id, starting_index, size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(result);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::WritePalmaApplicationSection(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
|
|
|
|
const auto starting_index{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto size{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto buffer = ctx.ReadBuffer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, starting_index={}, size={}",
|
|
|
|
|
|
|
|
connection_handle.npad_id, starting_index, size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->WritePalmaApplicationSection(
|
|
|
|
|
|
|
|
connection_handle.npad_id, starting_index, size, buffer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(result);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::ReadPalmaUniqueCode(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::ReadPalmaUniqueCode(HLERequestContext& ctx) {
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
@@ -2282,7 +2320,8 @@ void IHidServer::ReadPalmaUniqueCode(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ReadPalmaUniqueCode(connection_handle);
|
|
|
|
const auto result =
|
|
|
|
|
|
|
|
GetResourceManager()->GetPalma()->ReadPalmaUniqueCode(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
@@ -2295,29 +2334,45 @@ void IHidServer::SetPalmaUniqueCodeInvalid(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
const auto result =
|
|
|
|
GetResourceManager()->GetPalma()->SetPalmaUniqueCodeInvalid(connection_handle);
|
|
|
|
GetResourceManager()->GetPalma()->SetPalmaUniqueCodeInvalid(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::WritePalmaActivityEntry(HLERequestContext& ctx) {}
|
|
|
|
void IHidServer::WritePalmaActivityEntry(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
|
|
|
|
const auto a{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto b{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto c{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto d{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, a={}, b={}, c={}, d={}",
|
|
|
|
|
|
|
|
connection_handle.npad_id, a, b, c, d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->WritePalmaActivityEntry(
|
|
|
|
|
|
|
|
connection_handle.npad_id, a, b, c, d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(result);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::WritePalmaRgbLedPatternEntry(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::WritePalmaRgbLedPatternEntry(HLERequestContext& ctx) {
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
const auto unknown{rp.Pop<u64>()};
|
|
|
|
const auto pattern_type{rp.Pop<u64>()};
|
|
|
|
|
|
|
|
|
|
|
|
[[maybe_unused]] const auto buffer = ctx.ReadBuffer();
|
|
|
|
const auto buffer = ctx.ReadBuffer();
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, unknown={}",
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, pattern_type={}",
|
|
|
|
connection_handle.npad_id, unknown);
|
|
|
|
connection_handle.npad_id, pattern_type);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->WritePalmaRgbLedPatternEntry(
|
|
|
|
GetResourceManager()->GetPalma()->WritePalmaRgbLedPatternEntry(connection_handle, unknown);
|
|
|
|
connection_handle.npad_id, pattern_type, buffer);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::WritePalmaWaveEntry(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::WritePalmaWaveEntry(HLERequestContext& ctx) {
|
|
|
@@ -2349,10 +2404,10 @@ void IHidServer::WritePalmaWaveEntry(HLERequestContext& ctx) {
|
|
|
|
connection_handle.npad_id, wave_set, unknown, t_mem_handle, t_mem_size, size);
|
|
|
|
connection_handle.npad_id, wave_set, unknown, t_mem_handle, t_mem_size, size);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->WritePalmaWaveEntry(
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->WritePalmaWaveEntry(
|
|
|
|
connection_handle, wave_set, t_mem->GetSourceAddress(), t_mem_size);
|
|
|
|
connection_handle.npad_id, wave_set, t_mem->GetSourceAddress(), t_mem_size);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
|
|
@@ -2370,7 +2425,7 @@ void IHidServer::SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
|
|
|
parameters.connection_handle.npad_id, parameters.database_id_version);
|
|
|
|
parameters.connection_handle.npad_id, parameters.database_id_version);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->SetPalmaDataBaseIdentificationVersion(
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->SetPalmaDataBaseIdentificationVersion(
|
|
|
|
parameters.connection_handle, parameters.database_id_version);
|
|
|
|
parameters.connection_handle.npad_id, parameters.database_id_version);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
@@ -2382,18 +2437,32 @@ void IHidServer::GetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->GetPalmaDataBaseIdentificationVersion(
|
|
|
|
GetResourceManager()->GetPalma()->GetPalmaDataBaseIdentificationVersion(connection_handle);
|
|
|
|
connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SuspendPalmaFeature(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SuspendPalmaFeature(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
s32 palma_feature;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS_NOINIT(1);
|
|
|
|
|
|
|
|
PalmaConnectionHandle connection_handle;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Parameters) == 0x10, "Parameters has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters{rp.PopRaw<Parameters>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, database_id_version={}",
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.palma_feature);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->SuspendPalmaFeature(
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.palma_feature);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::GetPalmaOperationResult(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::GetPalmaOperationResult(HLERequestContext& ctx) {
|
|
|
@@ -2402,25 +2471,53 @@ void IHidServer::GetPalmaOperationResult(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = applet_resource->GetController<Controller_Palma>(HidController::Palma)
|
|
|
|
const auto result =
|
|
|
|
.GetPalmaOperationResult(connection_handle);
|
|
|
|
GetResourceManager()->GetPalma()->GetPalmaOperationResult(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(result);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::ReadPalmaPlayLog(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::ReadPalmaPlayLog(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
u16 entries;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES_NOINIT(6);
|
|
|
|
|
|
|
|
PalmaConnectionHandle connection_handle;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Parameters) == 0x10, "Parameters has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters{rp.PopRaw<Parameters>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, entries={}",
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.entries);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ReadPalmaPlayLog(
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.entries);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::ResetPalmaPlayLog(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::ResetPalmaPlayLog(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
u32 entries;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES_NOINIT(4);
|
|
|
|
|
|
|
|
PalmaConnectionHandle connection_handle;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Parameters) == 0x10, "Parameters has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters{rp.PopRaw<Parameters>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}, entries={}",
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.entries);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->ResetPalmaPlayLog(
|
|
|
|
|
|
|
|
parameters.connection_handle.npad_id, parameters.entries);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SetIsPalmaAllConnectable(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SetIsPalmaAllConnectable(HLERequestContext& ctx) {
|
|
|
@@ -2438,15 +2535,30 @@ void IHidServer::SetIsPalmaAllConnectable(HLERequestContext& ctx) {
|
|
|
|
"(STUBBED) called, is_palma_all_connectable={},applet_resource_user_id={}",
|
|
|
|
"(STUBBED) called, is_palma_all_connectable={},applet_resource_user_id={}",
|
|
|
|
parameters.is_palma_all_connectable, parameters.applet_resource_user_id);
|
|
|
|
parameters.is_palma_all_connectable, parameters.applet_resource_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
applet_resource->GetController<Controller_Palma>(HidController::Palma)
|
|
|
|
GetResourceManager()->GetPalma()->SetIsPalmaAllConnectable(parameters.applet_resource_user_id,
|
|
|
|
.SetIsPalmaAllConnectable(parameters.is_palma_all_connectable);
|
|
|
|
parameters.is_palma_all_connectable);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SetIsPalmaPairedConnectable(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SetIsPalmaPairedConnectable(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
bool is_palma_paired_connectable;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES_NOINIT(7);
|
|
|
|
|
|
|
|
u64 applet_resource_user_id;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Parameters) == 0x10, "Parameters has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters{rp.PopRaw<Parameters>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID,
|
|
|
|
|
|
|
|
"(STUBBED) called, is_palma_paired_connectable={},applet_resource_user_id={}",
|
|
|
|
|
|
|
|
parameters.is_palma_paired_connectable, parameters.applet_resource_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceManager()->GetPalma()->SetIsPalmaPairedConnectable(
|
|
|
|
|
|
|
|
parameters.applet_resource_user_id, parameters.is_palma_paired_connectable);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
@@ -2458,49 +2570,83 @@ void IHidServer::PairPalma(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
applet_resource->GetController<Controller_Palma>(HidController::Palma)
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->PairPalma(connection_handle.npad_id);
|
|
|
|
.PairPalma(connection_handle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SetPalmaBoostMode(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SetPalmaBoostMode(HLERequestContext& ctx) {
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
const auto palma_boost_mode{rp.Pop<bool>()};
|
|
|
|
const auto palma_boost_mode{rp.Pop<bool>()};
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, palma_boost_mode={}", palma_boost_mode);
|
|
|
|
LOG_INFO(Service_HID, "called, palma_boost_mode={}", palma_boost_mode);
|
|
|
|
|
|
|
|
|
|
|
|
applet_resource->GetController<Controller_Palma>(HidController::Palma)
|
|
|
|
// This no longer does anything. Use EnablePalmaBoostMode instead
|
|
|
|
.SetPalmaBoostMode(palma_boost_mode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::CancelWritePalmaWaveEntry(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::CancelWritePalmaWaveEntry(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto result =
|
|
|
|
|
|
|
|
GetResourceManager()->GetPalma()->CancelWritePalmaWaveEntry(connection_handle.npad_id);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::EnablePalmaBoostMode(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::EnablePalmaBoostMode(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
bool is_enabled;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES_NOINIT(7);
|
|
|
|
|
|
|
|
u64 applet_resource_user_id;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Parameters) == 0x10, "Parameters has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters{rp.PopRaw<Parameters>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, is_enabled={},applet_resource_user_id={}",
|
|
|
|
|
|
|
|
parameters.is_enabled, parameters.applet_resource_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceManager()->GetPalma()->EnablePalmaBoostMode(parameters.applet_resource_user_id,
|
|
|
|
|
|
|
|
parameters.is_enabled);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::GetPalmaBluetoothAddress(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::GetPalmaBluetoothAddress(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto connection_handle{rp.PopRaw<PalmaConnectionHandle>()};
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, connection_handle={}", connection_handle.npad_id);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
|
|
|
|
std::array<u8, 6> address{};
|
|
|
|
|
|
|
|
const auto result = GetResourceManager()->GetPalma()->GetPalmaBluetoothAddress(
|
|
|
|
|
|
|
|
connection_handle.npad_id, address);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 4};
|
|
|
|
|
|
|
|
rb.Push(result);
|
|
|
|
|
|
|
|
rb.PushRaw(address);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void IHidServer::SetDisallowedPalmaConnection(HLERequestContext& ctx) {
|
|
|
|
void IHidServer::SetDisallowedPalmaConnection(HLERequestContext& ctx) {
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
|
|
|
|
const auto applet_resource_user_id{rp.PopRaw<u64>()};
|
|
|
|
|
|
|
|
const auto address_buffer = ctx.ReadBuffer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
|
|
|
|
|
|
|
applet_resource_user_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceManager()->GetPalma()->SetDisallowedPalmaConnection(applet_resource_user_id,
|
|
|
|
|
|
|
|
address_buffer);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|