Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yuuzami opened this issue Jan 24, 2025 · 0 comments

Comments

@Yuuzami
Copy link

Yuuzami commented Jan 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant