public static object CallSystemFn(SteamVR_Utils.SystemFn fn, params object[] args) { bool flag = !SteamVR.active; if (flag) { EVRInitError evrinitError = EVRInitError.None; OpenVR.Init(ref evrinitError, EVRApplicationType.VRApplication_Utility, ""); } CVRSystem system = OpenVR.System; object result = (system != null) ? fn(system, args) : null; if (flag) { OpenVR.Shutdown(); } return(result); }
public static object CallSystemFn(SteamVR_Utils.SystemFn fn, params object[] args) { bool flag = !SteamVR.active && !SteamVR.usingNativeSupport; if (flag) { EVRInitError eVRInitError = EVRInitError.None; OpenVR.Init(ref eVRInitError, EVRApplicationType.VRApplication_Other); } CVRSystem system = OpenVR.System; object result = (system == null) ? null : fn(system, args); if (flag) { OpenVR.Shutdown(); } return(result); }