Skip to main content
Up and Coming
February 12, 2015

Can you call ovr_Initialize() multiple times?

Hello,

I am curious if I can call ovr_Initialize() and ovrHmd_Detect() multiple times in a thread without breaking anything?

The reason is that I would like to have a background thread that runs which detects whether the Rift has been plugged in or unplugged. In this manner I would like my application to adapt to the changes to the system.

I assume once the Rift is running and in use by the application I can't rerun ovr_Initialize() but if that is not the case please let folks know.

Thank you for your time.

    2 replies

    joan
    Up and Coming
    February 12, 2015
    ovr_Initialize() returns immediately if the system is already initialized.
    ovrHmd_Detect() "detects or re-detects HMDs and reports the total number detected". Don't call it from different threads at the same time though.
    Inspiring
    February 12, 2015
    Try checking ovrHmdCaps for ovrHmdCap_Present.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV