Skip to content

PollNextOverlayEvent trackedDeviceIndex returns 0 or uint overflow for events. #1124

Description

@Yuuzami

Hello!

I'm currently making a custom overlay application using the v2.8.3 plugin. I have created an overlay which uses mouse input (VROverlayInputMethod.Mouse) and has the multicursor flag set (VROverlayFlags.MultiCursor). In order to handle input events I'm using OpenVR.Overlay.PollNextOverlayEvent to handle MouseMove and MouseButton events. Here i differentiate between the controllers by getting the events trackedDeviceIndex which works as intended for mouse events.

However, for several other event types, of which i am primarily interested in the EVREventType.VREvent_FocusEnter and EVREventType.VREvent_FocusLeave events the trackedDeviceIndex property always returns 0. For other events i presume the property returns a negative value which causes a uint overflow and returns 4294967295 or 4294967297.

I've been looking for ways to either fix this or work around it, but so far i haven't found anything. Is this a known issue?

Edit: Occurs on both the Valve Index and Meta Quest Pro.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions