From 041f29a914b0e0ef88b4dad863cf71a6fdcca84f Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Fri, 3 May 2024 02:43:51 +0200 Subject: [PATCH] nn_act: Implement GetTimeZoneId placeholder --- src/Cafe/OS/libs/nn_act/nn_act.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Cafe/OS/libs/nn_act/nn_act.cpp b/src/Cafe/OS/libs/nn_act/nn_act.cpp index 2a9f61bc..af53edd7 100644 --- a/src/Cafe/OS/libs/nn_act/nn_act.cpp +++ b/src/Cafe/OS/libs/nn_act/nn_act.cpp @@ -5,6 +5,7 @@ #include "nn_act.h" #include "Cafe/OS/libs/nn_common.h" #include "Cafe/CafeSystem.h" +#include "Common/CafeString.h" sint32 numAccounts = 1; @@ -140,6 +141,14 @@ namespace act return 0; } + nnResult GetTimeZoneId(CafeString<65>* outTimezoneId) + { + // return a placeholder timezone id for now + // in the future we should emulated this correctly and read the timezone from the account via IOSU + outTimezoneId->assign("Europe/London"); + return 0; + } + sint32 g_initializeCount = 0; // inc in Initialize and dec in Finalize uint32 Initialize() { @@ -162,7 +171,6 @@ namespace act NN_ERROR_CODE errCode = NNResultToErrorCode(*nnResult, NN_RESULT_MODULE_NN_ACT); return errCode; } - } } @@ -691,6 +699,8 @@ void nnAct_load() osLib_addFunction("nn_act", "GetPersistentIdEx__Q2_2nn3actFUc", nnActExport_GetPersistentIdEx); // country osLib_addFunction("nn_act", "GetCountry__Q2_2nn3actFPc", nnActExport_GetCountry); + // timezone + cafeExportRegisterFunc(nn::act::GetTimeZoneId, "nn_act", "GetTimeZoneId__Q2_2nn3actFPc", LogType::Placeholder); // parental osLib_addFunction("nn_act", "EnableParentalControlCheck__Q2_2nn3actFb", nnActExport_EnableParentalControlCheck);