MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_Shutdown

Function ovr_Shutdown

ReviveXR/REV_CAPI.cpp:79–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79OVR_PUBLIC_FUNCTION(void) ovr_Shutdown()
80{
81 REV_TRACE(ovr_Shutdown);
82
83 // End all sessions
84 std::vector<XrSession> ToDestroy;
85 auto it = g_Sessions.begin();
86 while (it != g_Sessions.end())
87 {
88 // After years of work I have perfected my most unmaintainable line of
89 // code. It's very important that the iterator is incremented after the
90 // pointer is taken but before ovr_Destroy() is called or we *will* crash.
91 ovr_Destroy(&*it++);
92 }
93
94 // Destroy and reset the instance
95 XrResult rs = xrDestroyInstance(g_Instance);
96 assert(XR_SUCCEEDED(rs));
97 g_Instance = XR_NULL_HANDLE;
98
99 MicroProfileShutdown();
100}
101
102OVR_PUBLIC_FUNCTION(void) ovr_GetLastErrorInfo(ovrErrorInfo* errorInfo)
103{

Callers

nothing calls this directly

Calls 1

ovr_DestroyFunction · 0.70

Tested by

no test coverage detected