diff --git a/nx/include/switch/services/pctl.h b/nx/include/switch/services/pctl.h index 8c132d83..d1fbed28 100644 --- a/nx/include/switch/services/pctl.h +++ b/nx/include/switch/services/pctl.h @@ -12,9 +12,15 @@ Result pctlInitialize(void); void pctlExit(void); +/// Confirm whether VrMode is allowed. Only available with [4.0.0+]. +Result pctlConfirmStereoVisionPermission(void); + /// Gets whether Parental Controls are enabled. Result pctlIsRestrictionEnabled(bool *flag); +/// Reset the confirmation done by \ref pctlConfirmStereoVisionPermission. Only available with [5.0.0+]. +Result pctlResetConfirmedStereoVisionPermission(void); + /// Gets whether VrMode is allowed. Only available with [5.0.0+]. Result pctlIsStereoVisionPermitted(bool *flag); diff --git a/nx/source/services/pctl.c b/nx/source/services/pctl.c index 472bcb76..1a100760 100644 --- a/nx/source/services/pctl.c +++ b/nx/source/services/pctl.c @@ -150,10 +150,24 @@ static Result _pctlNoInputOutBool(u64 cmd_id, bool *flag) { return rc; } +Result pctlConfirmStereoVisionPermission(void) { + if (hosversionBefore(4,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + + return _pctlNoIO(1013); +} + Result pctlIsRestrictionEnabled(bool *flag) { return _pctlNoInputOutBool(1031, flag); } +Result pctlResetConfirmedStereoVisionPermission(void) { + if (hosversionBefore(5,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + + return _pctlNoIO(1064); +} + Result pctlIsStereoVisionPermitted(bool *flag) { if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);