From 2916bd631a75ef3da422d6ebedc98e62baa58d7a Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sat, 20 Apr 2019 16:09:35 -0400 Subject: [PATCH] Added pctlIsStereoVisionPermitted. --- nx/include/switch/services/pctl.h | 3 +++ nx/source/services/pctl.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/nx/include/switch/services/pctl.h b/nx/include/switch/services/pctl.h index 2e70a893..8c132d83 100644 --- a/nx/include/switch/services/pctl.h +++ b/nx/include/switch/services/pctl.h @@ -15,3 +15,6 @@ void pctlExit(void); /// Gets whether Parental Controls are enabled. Result pctlIsRestrictionEnabled(bool *flag); +/// 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 b6277059..472bcb76 100644 --- a/nx/source/services/pctl.c +++ b/nx/source/services/pctl.c @@ -154,3 +154,10 @@ Result pctlIsRestrictionEnabled(bool *flag) { return _pctlNoInputOutBool(1031, flag); } +Result pctlIsStereoVisionPermitted(bool *flag) { + if (hosversionBefore(5,0,0)) + return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); + + return _pctlNoInputOutBool(1065, flag); +} +