| 198 | } |
| 199 | |
| 200 | bool VR_IsHmdPresent() |
| 201 | { |
| 202 | std::lock_guard<std::recursive_mutex> lock( g_mutexSystem ); |
| 203 | |
| 204 | if( g_pHmdSystem ) |
| 205 | { |
| 206 | // if we're already initialized, just call through |
| 207 | return g_pHmdSystem->BIsHmdPresent(); |
| 208 | } |
| 209 | else |
| 210 | { |
| 211 | // otherwise we need to do a bit more work |
| 212 | EVRInitError err = VR_LoadHmdSystemInternal(); |
| 213 | if( err != VRInitError_None ) |
| 214 | return false; |
| 215 | |
| 216 | bool bHasHmd = g_pHmdSystem->BIsHmdPresent(); |
| 217 | |
| 218 | g_pHmdSystem = NULL; |
| 219 | SharedLib_Unload( g_pVRModule ); |
| 220 | g_pVRModule = NULL; |
| 221 | |
| 222 | return bHasHmd; |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /** Returns true if the OpenVR runtime is installed. */ |
| 227 | bool VR_IsRuntimeInstalled() |
nothing calls this directly
no test coverage detected