Skip to content

Commit

Permalink
ValveSoftware#1873 bug fix, exposing the existing CVRResources API in…
Browse files Browse the repository at this point in the history
… the same manner as the others.
  • Loading branch information
fraser committed Sep 17, 2024
1 parent ae46a8d commit e6b9f89
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8214,6 +8214,19 @@ public CVRRenderModels VRRenderModels()
return m_pVRRenderModels;
}

public CVRResources VRResources()
{
CheckClear();
if (m_pVRResources == null)
{
var eError = EVRInitError.None;
var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRResources_Version, ref eError);
if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
m_pVRResources = new CVRResources(pInterface);
}
return m_pVRResources;
}

public CVRExtendedDisplay VRExtendedDisplay()
{
CheckClear();
Expand Down Expand Up @@ -8352,6 +8365,7 @@ public CVRNotifications VRNotifications()
private CVROverlay m_pVROverlay;
private CVROverlayView m_pVROverlayView;
private CVRRenderModels m_pVRRenderModels;
private CVRResources m_pVRResources;
private CVRExtendedDisplay m_pVRExtendedDisplay;
private CVRSettings m_pVRSettings;
private CVRApplications m_pVRApplications;
Expand Down Expand Up @@ -8383,6 +8397,7 @@ static COpenVRContext OpenVRInternal_ModuleContext
public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } }
public static CVROverlayView OverlayView { get { return OpenVRInternal_ModuleContext.VROverlayView(); } }
public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } }
public static CVRResources Resources { get { return OpenVRInternal_ModuleContext.VRResources(); } }
public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } }
public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } }
public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } }
Expand Down

0 comments on commit e6b9f89

Please sign in to comment.