From 72f14ae21f93663c74aec7e12f23d6dc52a7350c Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 25 Jun 2020 02:00:25 -0400 Subject: [PATCH] caps_u: Fix GetAlbumContentsFileListForApplication stub --- src/core/hle/service/caps/caps_u.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 34f7f3881..f36d8de2d 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp @@ -58,19 +58,25 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c // u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total // output entries (which is copied to a s32 by official SW). IPC::RequestParser rp{ctx}; - [[maybe_unused]] const auto application_album_file_entries = rp.PopRaw>(); - const auto pid = rp.Pop(); - const auto content_type = rp.PopRaw(); - [[maybe_unused]] const auto start_datetime = rp.PopRaw(); - [[maybe_unused]] const auto end_datetime = rp.PopRaw(); - const auto applet_resource_user_id = rp.Pop(); + const auto pid{rp.Pop()}; + const auto content_type{rp.PopEnum()}; + const auto start_posix_time{rp.Pop()}; + const auto end_posix_time{rp.Pop()}; + const auto applet_resource_user_id{rp.Pop()}; + + // TODO: Update this when we implement the album. + // Currently we do not have a method of accessing album entries, set this to 0 for now. + constexpr s32 total_entries{0}; + LOG_WARNING(Service_Capture, - "(STUBBED) called. pid={}, content_type={}, applet_resource_user_id={}", pid, - content_type, applet_resource_user_id); + "(STUBBED) called. pid={}, content_type={}, start_posix_time={}, " + "end_posix_time={}, applet_resource_user_id={}, total_entries={}", + pid, content_type, start_posix_time, end_posix_time, applet_resource_user_id, + total_entries); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push(0); + rb.Push(total_entries); } } // namespace Service::Capture