Commit 939c41ab authored by Ryan Pavlik's avatar Ryan Pavlik

st/oxr: If the app called request-exit, go to exiting instead of ready.

parent 6b99e2fb
......@@ -933,6 +933,7 @@ struct oxr_session
XrSessionState state;
bool frame_started;
bool exiting;
struct u_hashmap_int *act_sets;
struct u_hashmap_int *sources;
......
......@@ -145,8 +145,11 @@ oxr_session_end(struct oxr_logger *log, struct oxr_session *sess)
}
oxr_session_change_state(log, sess, XR_SESSION_STATE_IDLE);
oxr_session_change_state(log, sess, XR_SESSION_STATE_READY);
if (sess->exiting) {
oxr_session_change_state(log, sess, XR_SESSION_STATE_EXITING);
} else {
oxr_session_change_state(log, sess, XR_SESSION_STATE_READY);
}
return oxr_session_success_result(sess);
}
......@@ -166,6 +169,7 @@ oxr_session_request_exit(struct oxr_logger *log, struct oxr_session *sess)
}
//! @todo start fading out the app.
oxr_session_change_state(log, sess, XR_SESSION_STATE_STOPPING);
sess->exiting = true;
return oxr_session_success_result(sess);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment