The open source OpenXR runtime

st/oxr: Fix one place that was checking for session running in a weird way.

Techincally "session running" depends entirely on what calls
have been made, and not on the session state events that were
polled.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2344>

authored by

Rylie Pavlik and committed by
Marge Bot
ee2ddead 3b232b74

+1 -1
+1 -1
src/xrt/state_trackers/oxr/oxr_session.c
··· 285 285 * If the session is not running when the application calls xrEndSession, the runtime must return 286 286 * error XR_ERROR_SESSION_NOT_RUNNING 287 287 */ 288 - if (sess->state == XR_SESSION_STATE_IDLE || sess->state == XR_SESSION_STATE_READY) { 288 + if (!oxr_frame_sync_is_session_running(&sess->frame_sync)) { 289 289 return oxr_error(log, XR_ERROR_SESSION_NOT_RUNNING, "Session is not running"); 290 290 } 291 291