Throw error on failed parental validation.

Also use CFGU instead of CFG for reading restrictions
This commit is contained in:
2024-05-07 21:45:43 -04:00
parent c6b6f560be
commit cdf30f3bea
2 changed files with 2 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ Result load_parental_controls(Parental_Restrictions_s *restrictions)
char parental_data[0xC0] = {0}; char parental_data[0xC0] = {0};
Result res; Result res;
if (R_FAILED(res = CFG_GetConfigInfoBlk8(0xC0, 0x000C0000, &parental_data))) return res; if (R_FAILED(res = CFGU_GetConfigInfoBlk2(0xC0, 0x000C0000, &parental_data))) return res;
memcpy(restrictions, parental_data, 4); memcpy(restrictions, parental_data, 4);
return 0; return 0;

View File

@@ -505,6 +505,7 @@ bool themeplaza_browser(EntryMode mode)
SwkbdResult swkbd_res = swkbdGetResult(&swkbd); SwkbdResult swkbd_res = swkbdGetResult(&swkbd);
if (swkbd_res != SWKBD_PARENTAL_OK) if (swkbd_res != SWKBD_PARENTAL_OK)
{ {
throw_error("Parental Control validation failed!\nBrowser Access restricted.", ERROR_LEVEL_WARNING);
return downloaded; return downloaded;
} }
} }