Skip to content

Improve xrSession error handling

Simon Zeni requested to merge bl4ckb0ne/monado:session-state-woes into main

Related to #344

We were missing a couple of cases around whether a session could begin or could end.

From 9.1. Session Lifecycle

A session is considered running after a successful call to xrBeginSession and remains running until any call is made to xrEndSession. Certain functions are only valid to call when a session is running, such as xrWaitFrame, or else the XR_ERROR_SESSION_NOT_RUNNING error must be returned by the runtime.

A session is considered not running before a successful call to xrBeginSession and becomes not running again after any call is made to xrEndSession. Certain functions are only valid to call when a session is not running, such as xrBeginSession, or else the XR_ERROR_SESSION_RUNNING error must be returned by the runtime.

Edited by Simon Zeni

Merge request reports