From 7a7dad05c062ae7321bf4ece65c94bcf4b703386 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sat, 20 Oct 2018 00:01:10 +1100 Subject: [PATCH] Stubbed home blocking Needed by arms due to new hid rework --- src/core/hle/service/am/am.cpp | 36 ++++++++++++++++++++++++++++++---- src/core/hle/service/am/am.h | 4 ++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 69bfce1c1a..4d1f83170b 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -638,10 +638,12 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF {24, nullptr, "GetLaunchStorageInfoForDebug"}, {25, nullptr, "ExtendSaveData"}, {26, nullptr, "GetSaveDataSize"}, - {30, nullptr, "BeginBlockingHomeButtonShortAndLongPressed"}, - {31, nullptr, "EndBlockingHomeButtonShortAndLongPressed"}, - {32, nullptr, "BeginBlockingHomeButton"}, - {33, nullptr, "EndBlockingHomeButton"}, + {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, + "BeginBlockingHomeButtonShortAndLongPressed"}, + {31, &IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed, + "EndBlockingHomeButtonShortAndLongPressed"}, + {32, &IApplicationFunctions::BeginBlockingHomeButton, "BeginBlockingHomeButton"}, + {33, &IApplicationFunctions::EndBlockingHomeButton, "EndBlockingHomeButton"}, {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, {60, nullptr, "SetMediaPlaybackStateForApplication"}, @@ -669,6 +671,32 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF IApplicationFunctions::~IApplicationFunctions() = default; +void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed( + Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + LOG_WARNING(Service_AM, "(STUBBED) called"); +} + +void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed( + Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + LOG_WARNING(Service_AM, "(STUBBED) called"); +} + +void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + LOG_WARNING(Service_AM, "(STUBBED) called"); +} + +void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + LOG_WARNING(Service_AM, "(STUBBED) called"); +} + void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { constexpr std::array data{{ 0xca, 0x97, 0x94, 0xc7, // Magic diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index b39b0d8380..095f948511 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -154,6 +154,10 @@ private: void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); void NotifyRunning(Kernel::HLERequestContext& ctx); void GetPseudoDeviceId(Kernel::HLERequestContext& ctx); + void BeginBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx); + void EndBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx); + void BeginBlockingHomeButton(Kernel::HLERequestContext& ctx); + void EndBlockingHomeButton(Kernel::HLERequestContext& ctx); }; class IHomeMenuFunctions final : public ServiceFramework {