Пример #1
0
        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,
            });
        }
Пример #2
0
 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
     };
 }
Пример #3
0
 private static extern void GetStatus(IntPtr session, ref SessionStatusInternal status);
Пример #4
0
 private static extern void GetStatus(IntPtr session, ref SessionStatusInternal status);