1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-21 06:42:02 +00:00
Ryujinx/Ryujinx.HLE/HOS/Services/Pctl/ResultCode.cs
Ac_K 313f8d2eb6
am/lbl/hid/pctl: Enabled VR Rendering (#1688)
* am/lbl/hid/pctl: Enabled VR Rendering

This PR enable VR rendering on games which support it through the Toy-Con VR Goggles.

Please remember Ryujinx currently don't support console SixAxis sensor and for now, in some games, the view can't be moved.

Everything is implemented accordingly to RE:
- am: ICommonStateGetter: SetVrModeEnabled, BeginVrModeEx, EndVrModeEx.
- lbl: ILblController: SetBrightnessReflectionDelayLevel, GetBrightnessReflectionDelayLevel, SetCurrentAmbientLightSensorMapping, GetCurrentAmbientLightSensorMapping, SetCurrentBrightnessSettingForVrMode, GetCurrentBrightnessSettingForVrMode, EnableVrMode, DisableVrMode, IsVrModeEnabled.
- pctl: IParentalControlService: ConfirmStereoVisionPermission, ConfirmStereoVisionRestrictionConfigurable, GetStereoVisionRestriction, SetStereoVisionRestriction, ResetConfirmedStereoVisionPermission, IsStereoVisionPermitted.
- hid: IHidServer: ResetSevenSixAxisSensorTimestamp is stubbed because we don't support console SixAxisSensor for now.

Maybe we could add a setting later to enable or disable VR. But I think it's fine to keep this always available since you have to enable it in games.

* Fix permission flag check

* Address gdkchan feedback
2020-11-15 22:30:20 +01:00

16 lines
610 B
C#

namespace Ryujinx.HLE.HOS.Services.Pctl
{
enum ResultCode
{
ModuleId = 142,
ErrorCodeShift = 9,
Success = 0,
FreeCommunicationDisabled = (101 << ErrorCodeShift) | ModuleId,
StereoVisionDenied = (104 << ErrorCodeShift) | ModuleId,
InvalidPid = (131 << ErrorCodeShift) | ModuleId,
PermissionDenied = (133 << ErrorCodeShift) | ModuleId,
StereoVisionRestrictionConfigurableDisabled = (181 << ErrorCodeShift) | ModuleId,
}
}