| 492 | static ServerProvider server; |
| 493 | |
| 494 | extern "C" __declspec(dllexport) void *HmdDriverFactory(const char *iName, int *retCode) { |
| 495 | /*if (PVRCheckIfExpired()) { |
| 496 | PVR_DB("This version of PhoneVR driver has expired. Please install a more recent |
| 497 | version"); *retCode = VRInitError_Driver_Failed; return nullptr; |
| 498 | }*/ |
| 499 | if (!PVRProp<bool>({ENABLE_KEY})) { |
| 500 | PVR_DB_I("PhoneVR server disabled!"); |
| 501 | *retCode = VRInitError_Driver_Failed; |
| 502 | return nullptr; |
| 503 | } |
| 504 | |
| 505 | if (strcmp(iName, IServerTrackedDeviceProvider_Version) == 0) { |
| 506 | // PVR_DB_CLEAR(); |
| 507 | PVR_DB_I("------------------------------------"); |
| 508 | PVR_DB_I("Getting server"); |
| 509 | return &server; |
| 510 | } |
| 511 | if (strcmp(iName, IVRWatchdogProvider_Version) == 0) { |
| 512 | PVR_DB_I("Watchdog not supported"); |
| 513 | return nullptr; |
| 514 | } |
| 515 | PVR_DB_I("Interface not found: "s + iName); |
| 516 | if (retCode) |
| 517 | *retCode = VRInitError_Init_InterfaceNotFound; |
| 518 | return nullptr; |
| 519 | } |
nothing calls this directly
no outgoing calls
no test coverage detected