Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
tmason101's avatar
tmason101
Honored Guest
11 years ago

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

  • 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.