Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from LibreVR:master #76

Merged
merged 9 commits into from
Oct 3, 2019
Prev Previous commit
Next Next commit
ReviveXR: gracefully handle session shutdown
As with the dummy session, request and wait for XR to shut itself down.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
  • Loading branch information
qlyoung committed Oct 3, 2019
commit 70592a2ca6aa9cf32272369f85014f0cb31b34d1
5 changes: 3 additions & 2 deletions ReviveXR/REV_CAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ OVR_PUBLIC_FUNCTION(void) ovr_Destroy(ovrSession session)
XrSession handle = session->Session;
if (handle)
{
XrResult rs = xrEndSession(handle);
assert(XR_SUCCEEDED(rs));
xrRequestExitSession(session->Session);
while (!XR_SUCCEEDED(xrEndSession(handle)))
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}

if (session->HookedFunction)
Expand Down