From 66ae161cf879aaa6800c13d8a5144e96815a2385 Mon Sep 17 00:00:00 2001 From: Jarrod Norwell Date: Sat, 1 Jun 2024 15:22:10 +0200 Subject: [PATCH] Stubbed QueryLastPlayTime --- src/core/hle/service/ns/query_service.cpp | 11 ++++++++++- src/core/hle/service/ns/query_service.h | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/ns/query_service.cpp b/src/core/hle/service/ns/query_service.cpp index 138400541..f080c686a 100644 --- a/src/core/hle/service/ns/query_service.cpp +++ b/src/core/hle/service/ns/query_service.cpp @@ -29,7 +29,7 @@ IQueryService::IQueryService(Core::System& system_) : ServiceFramework{system_, {14, nullptr, "QueryRecentlyPlayedApplication"}, {15, nullptr, "GetRecentlyPlayedApplicationUpdateEvent"}, {16, nullptr, "QueryApplicationPlayStatisticsByUserAccountIdForSystemV0"}, - {17, nullptr, "QueryLastPlayTime"}, + {17, D<&IQueryService::QueryLastPlayTime>, "QueryLastPlayTime"}, {18, nullptr, "QueryApplicationPlayStatisticsForSystem"}, {19, nullptr, "QueryApplicationPlayStatisticsByUserAccountIdForSystem"}, }; @@ -53,4 +53,13 @@ Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId( R_SUCCEED(); } +Result IQueryService::QueryLastPlayTime( + Out out_entries, u8 unknown, + OutArray out_last_play_times, + InArray application_ids) { + *out_entries = 1; + *out_last_play_times = {}; + R_SUCCEED(); +} + } // namespace Service::NS diff --git a/src/core/hle/service/ns/query_service.h b/src/core/hle/service/ns/query_service.h index c4c82b752..6050ea152 100644 --- a/src/core/hle/service/ns/query_service.h +++ b/src/core/hle/service/ns/query_service.h @@ -23,6 +23,8 @@ struct PlayStatistics { }; static_assert(sizeof(PlayStatistics) == 0x28, "PlayStatistics is an invalid size"); +struct LastPlayTime {}; + class IQueryService final : public ServiceFramework { public: explicit IQueryService(Core::System& system_); @@ -31,6 +33,9 @@ public: private: Result QueryPlayStatisticsByApplicationIdAndUserAccountId( Out out_play_statistics, bool unknown, u64 application_id, Uid account_id); + Result QueryLastPlayTime(Out out_entries, u8 unknown, + OutArray out_last_play_times, + InArray application_ids); }; } // namespace Service::NS