mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Added appletIsVrModeEnabled and appletSetVrModeEnabled.
This commit is contained in:
parent
6b50fddd9b
commit
76b6f521fe
@ -301,6 +301,22 @@ Result appletHomeButtonReaderLockAccessorGetEvent(Event *out_event);
|
||||
*/
|
||||
Result appletPushToGeneralChannel(AppletStorage *s);
|
||||
|
||||
/**
|
||||
* @brief Gets whether VrMode is enabled.
|
||||
* @note Only available with [3.0.0+].
|
||||
* @param out Output flag
|
||||
*/
|
||||
Result appletIsVrModeEnabled(bool *out);
|
||||
|
||||
/**
|
||||
* @brief Sets whether VrMode is enabled.
|
||||
* @note This is only fully usable system-side with [6.0.0+].
|
||||
* @note For checking Parental Controls, see \ref pctlIsStereoVisionPermitted.
|
||||
* @note On pre-7.0.0 this uses cmd SetVrModeEnabled internally, while on [7.0.0+] this uses cmds BeginVrModeEx/EndVrModeEx.
|
||||
* @param flag Flag
|
||||
*/
|
||||
Result appletSetVrModeEnabled(bool flag);
|
||||
|
||||
/**
|
||||
* @brief Sets the \ref ApmCpuBoostMode.
|
||||
* @note Only available with [7.0.0+] (not fully usable system-side with 6.x).
|
||||
|
@ -1670,6 +1670,23 @@ Result appletPushToGeneralChannel(AppletStorage *s) {
|
||||
return _appletCmdInStorage(&g_appletICommonStateGetter, s, 20);
|
||||
}
|
||||
|
||||
Result appletIsVrModeEnabled(bool *out) {
|
||||
if (hosversionBefore(3,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _appletCmdNoInOutBool(&g_appletICommonStateGetter, out, 50);
|
||||
}
|
||||
|
||||
Result appletSetVrModeEnabled(bool flag) {
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
if (hosversionBefore(7,0,0))
|
||||
return _appletCmdInBool(&g_appletICommonStateGetter, flag, 51);
|
||||
|
||||
return _appletCmdNoIO(&g_appletICommonStateGetter, flag ? 53 : 54);
|
||||
}
|
||||
|
||||
Result appletSetCpuBoostMode(ApmCpuBoostMode mode) {
|
||||
Result rc=0;
|
||||
if (hosversionBefore(7,0,0))
|
||||
|
Loading…
Reference in New Issue
Block a user