From ac414d2bc55f88318215d1f79142e8ba32f7c625 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 16 Oct 2022 12:45:50 -0400 Subject: [PATCH] pdm: Updated sysver checks for 15.0.0. --- nx/include/switch/services/pdm.h | 4 ++-- nx/source/services/pdm.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nx/include/switch/services/pdm.h b/nx/include/switch/services/pdm.h index 469888be..f49b38f0 100644 --- a/nx/include/switch/services/pdm.h +++ b/nx/include/switch/services/pdm.h @@ -255,7 +255,7 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entrie /** * @brief Gets a list of applications played by the specified user. - * @note Only available with [6.0.0+]. + * @note Only available with [6.0.0-14.1.2]. * @param[in] uid \ref AccountUid * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3. * @param[out] application_ids Output ApplicationIds array. @@ -266,7 +266,7 @@ Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *appl /** * @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0. - * @note Only available with [6.0.0+]. + * @note Only available with [6.0.0-14.1.2]. * @note The Event must be closed by the user once finished with it. * @param[out] out_event Output Event with autoclear=false. */ diff --git a/nx/source/services/pdm.c b/nx/source/services/pdm.c index 40f14043..00b1db94 100644 --- a/nx/source/services/pdm.c +++ b/nx/source/services/pdm.c @@ -181,7 +181,7 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entrie } Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out) { - if (hosversionBefore(6,0,0)) + if (!hosversionBetween(6,15)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); if (hosversionBefore(10,0,0)) { @@ -204,7 +204,7 @@ Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *appl } Result pdmqryGetRecentlyPlayedApplicationUpdateEvent(Event* out_event) { - if (hosversionBefore(6,0,0)) + if (!hosversionBetween(6,15)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _pdmCmdGetEvent(&g_pdmqrySrv, out_event, false, 15);