public static SessionStatus GetStatus(IntPtr session) { var statusInternal = new SessionStatusInternal { DisplayLost = 0, IsVisible = 0, ShouldQuit = 0, HmdMounted = 0, HmdPresent = 0, ShouldRecenter = 0 }; GetStatus(session, ref statusInternal); return(new SessionStatus { DisplayLost = statusInternal.DisplayLost == 1, HmdMounted = statusInternal.HmdMounted == 1, HmdPresent = statusInternal.HmdPresent == 1, IsVisible = statusInternal.IsVisible == 1, ShouldQuit = statusInternal.ShouldQuit == 1, ShouldRecenter = statusInternal.ShouldRecenter == 1, }); }
public static SessionStatus GetStatus(IntPtr session) { var statusInternal = new SessionStatusInternal { DisplayLost = 0, IsVisible = 0, ShouldQuit = 0, HmdMounted = 0, HmdPresent = 0, ShouldRecenter = 0 }; GetStatus(session, ref statusInternal); return new SessionStatus { DisplayLost = statusInternal.DisplayLost == 1, HmdMounted = statusInternal.HmdMounted == 1, HmdPresent = statusInternal.HmdPresent == 1, IsVisible = statusInternal.IsVisible == 1, ShouldQuit = statusInternal.ShouldQuit == 1, ShouldRecenter = statusInternal.ShouldRecenter == 1 }; }
private static extern void GetStatus(IntPtr session, ref SessionStatusInternal status);