Skip to content

Instantly share code, notes, and snippets.

@BOLL7708
Last active January 30, 2019 19:06
Show Gist options
  • Save BOLL7708/5a94abb59b2e13d21be42075ad175f4d to your computer and use it in GitHub Desktop.
Save BOLL7708/5a94abb59b2e13d21be42075ad175f4d to your computer and use it in GitHub Desktop.
Add OpenVR notification support to C# header file
diff --git a/SteamVR_HUDCenter/SteamVR/openvr_api.cs b/SteamVR_HUDCenter/SteamVR/openvr_api.cs
index 37ee80a..5316fc3 100644
--- a/SteamVR_HUDCenter/SteamVR/openvr_api.cs
+++ b/SteamVR_HUDCenter/SteamVR/openvr_api.cs
@@ -5631,6 +5631,7 @@ public enum EIOBufferMode
public IntPtr m_pVRInput; // class vr::IVRInput *
public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer *
public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors *
+ public IntPtr m_pVRNotifications; // class vr::IVRNotifications *
}
public class OpenVR
@@ -5948,6 +5949,7 @@ public class OpenVR
m_pVRTrackedCamera = null;
m_pVRInput = null;
m_pVRSpatialAnchors = null;
+ m_pVRNotifications = null;
}
void CheckClear()
@@ -6128,7 +6130,20 @@ public class OpenVR
return m_pVRSpatialAnchors;
}
+ public CVRNotifications VRNotifications()
+ {
+ CheckClear();
+ if (m_pVRNotifications == null)
+ {
+ var eError = EVRInitError.None;
+ var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRNotifications_Version, ref eError);
+ if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
+ m_pVRNotifications = new CVRNotifications(pInterface);
+ }
+ return m_pVRNotifications;
+ }
+
private CVRSystem m_pVRSystem;
private CVRChaperone m_pVRChaperone;
private CVRChaperoneSetup m_pVRChaperoneSetup;
@@ -6141,6 +6156,7 @@ public class OpenVR
private CVRTrackedCamera m_pVRTrackedCamera;
private CVRInput m_pVRInput;
private CVRSpatialAnchors m_pVRSpatialAnchors;
+ private CVRNotifications m_pVRNotifications;
};
private static COpenVRContext _OpenVRInternal_ModuleContext = null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment