diff options
author | Liam <byteslice@airmail.cc> | 2024-01-07 03:21:01 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-30 02:17:33 +0100 |
commit | 68303ed6016da0926df8b62e5a0c55c9b914f927 (patch) | |
tree | 35c805cffc86c668ae88641bd42358105ed6751a /src/core/hle/service/am/common_state_getter.cpp | |
parent | am: return AppletDataBroker and use for frontend applets (diff) | |
download | yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.gz yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.bz2 yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.lz yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.xz yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.zst yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.zip |
Diffstat (limited to 'src/core/hle/service/am/common_state_getter.cpp')
-rw-r--r-- | src/core/hle/service/am/common_state_getter.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/core/hle/service/am/common_state_getter.cpp b/src/core/hle/service/am/common_state_getter.cpp index 77f3fd868..937ac0beb 100644 --- a/src/core/hle/service/am/common_state_getter.cpp +++ b/src/core/hle/service/am/common_state_getter.cpp @@ -60,7 +60,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap {91, nullptr, "GetCurrentPerformanceConfiguration"}, {100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"}, {110, nullptr, "OpenMyGpuErrorHandler"}, - {120, nullptr, "GetAppletLaunchedHistory"}, + {120, &ICommonStateGetter::GetAppletLaunchedHistory, "GetAppletLaunchedHistory"}, {200, nullptr, "GetOperationModeSystemInfo"}, {300, &ICommonStateGetter::GetSettingsPlatformRegion, "GetSettingsPlatformRegion"}, {400, nullptr, "ActivateMigrationService"}, @@ -271,6 +271,27 @@ void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(HLERequestContext& rb.Push(ResultSuccess); } +void ICommonStateGetter::GetAppletLaunchedHistory(HLERequestContext& ctx) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + + std::shared_ptr<Applet> current_applet = applet; + std::vector<AppletId> result; + + const size_t count = ctx.GetWriteBufferNumElements<AppletId>(); + size_t i; + + for (i = 0; i < count && current_applet != nullptr; i++) { + result.push_back(current_applet->applet_id); + current_applet = current_applet->caller_applet.lock(); + } + + ctx.WriteBuffer(result); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(static_cast<u32>(i)); +} + void ICommonStateGetter::GetSettingsPlatformRegion(HLERequestContext& ctx) { LOG_WARNING(Service_AM, "(STUBBED) called"); |