Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion projects/psvr2_openvr_driver_ex/hmd_device_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace psvr2_toolkit {
#ifdef OPENVR_EXTENSIONS_AVAILABLE
void* g_pOpenVRExHandle = nullptr;
#endif
vr::VRInputComponentHandle_t eyeTrackingComponent;
vr::VRInputComponentHandle_t eyeTrackingComponent = vr::k_ulInvalidInputComponentHandle;
int64_t currentBrightness;

vr::EVRInitError (*sie__psvr2__HmdDevice__Activate)(void *, uint32_t) = nullptr;
Expand Down Expand Up @@ -125,6 +125,11 @@ namespace psvr2_toolkit {

void HmdDeviceHooks::UpdateGaze(void* pData, size_t dwSize)
{
if (eyeTrackingComponent == vr::k_ulInvalidInputComponentHandle)
{
return;
}

Hmd2GazeState* pGazeState = reinterpret_cast<Hmd2GazeState*>(pData);
vr::VREyeTrackingData_t eyeTrackingData {};

Expand Down
Loading