mirror of
https://github.com/libretro/libretro-3dengine.git
synced 2026-11-07 18:38:26 -10:00
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]>