ChristophHaag / SteamVR-OpenHMD

SteamVR plugin for using OpenHMD drivers in SteamVR
Boost Software License 1.0
193 stars 33 forks source link

Fix gaze cursor for Oculus devices #22

Closed interfect closed 5 years ago

interfect commented 5 years ago

SteamVR checks if Prop_ManufacturerName_String == "Oculus" somewhere in their UI code. If you don't send it, and you don't have any real controllers, you don't get the fallback gaze cursor, so you can't use the menus.

I'm grabbing the first word of OHMD_VENDOR to provide the manufacturer name, which is "Oculus" on the Oculus DK1 that I have.

This lets me get a gaze cursor and navigate SteamVR Home with the headset and a gamepad.

I've also replaced some fragile-looking strcpy code with std::stringstream.

This should fix #21.