A core learns about a headset only from the HMD status bit;
SET_VIDEO_VIEWS returning true means the map was accepted. The scene
walker now enters VR on the first frame with HMD, sends a TRACKED map
at the frontend's recommended eye size and goes flat with an empty map.
A video reinit restarts the headset session, and entering or leaving VR
changes the geometry, which reinits video. A lost headset is waited for
five seconds, repeating the last frame, before the core goes flat.
Input is still polled on those frames.
While VR is tracking, the map is sent every retro_run(), as libretro.h
asks: it covers state loads and run-ahead. The frontend writes the
recommended eye size back on each call, so a new size there is taken as
a resize, and the AV info is sent once for it. A frontend that reports
a headset but refuses the tracked map is not asked again until the
headset drops or the VR option is turned off.
Co-authored-by: Craig <[email protected]>
The header from RetroArch's unified OpenXR pull request
(libretro/RetroArch#19811). REQUEST_FLAT and ipd_hint_m are gone from
retro_video_views: a flat map is one without TRACKED, and OpenXR always
gives real eye poses.
Co-authored-by: Craig <[email protected]>
RetroArch's VR surface is now the view map: the session request
becomes two eye-tagged side-by-side views with the flat request as a
flag, the reference space and IPD hint carried alongside, and the
recommended per-eye size read back from the views struct. The frame
loop is untouched - GET_VR_FRAME_STATE keeps its struct at its new
number - and a TARGET_RESIZED frame re-requests with the updated
sizes exactly as before. The bundled libretro.h is synced to the
converged header.