MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / ProcessVREvent

Method ProcessVREvent

samples/hellovr_vulkan/hellovr_vulkan_main.cpp:1669–1690  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Purpose: Processes a single VR event -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1667// Purpose: Processes a single VR event
1668//-----------------------------------------------------------------------------
1669void CMainApplication::ProcessVREvent( const vr::VREvent_t & event )
1670{
1671 switch( event.eventType )
1672 {
1673 case vr::VREvent_TrackedDeviceActivated:
1674 {
1675 SetupRenderModelForTrackedDevice( event.trackedDeviceIndex );
1676 dprintf( "Device %u attached. Setting up render model.\n", event.trackedDeviceIndex );
1677 }
1678 break;
1679 case vr::VREvent_TrackedDeviceDeactivated:
1680 {
1681 dprintf( "Device %u detached.\n", event.trackedDeviceIndex );
1682 }
1683 break;
1684 case vr::VREvent_TrackedDeviceUpdated:
1685 {
1686 dprintf( "Device %u updated.\n", event.trackedDeviceIndex );
1687 }
1688 break;
1689 }
1690}
1691
1692//-----------------------------------------------------------------------------
1693// Purpose:

Callers

nothing calls this directly

Calls 1

dprintfFunction · 0.70

Tested by

no test coverage detected