ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.07k stars 1.28k forks source link

Question on hmd_presence and setting edid/pid #570

Open dashingstag opened 7 years ago

dashingstag commented 7 years ago

May I ask what is the significance of hmd_presence in the driver settings folder versus setting edidvid and edidpid from within the driver with

vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, vr::Prop_EdidVendorID_Int32, vid); vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, vr::Prop_EdidProductID_Int32, pid);

Also these seem to have little significance if the device is an extended monitor but has great significance in direct mode?

godbyk commented 7 years ago

Setting the EDID VID and PID properties is required to enable direct mode on your HMD.

dashingstag commented 7 years ago

Setting the EDID VID and PID properties is required to enable direct mode on your HMD.

Yea I got that. My actual question was meant to ask more on hmd_presence though.

TheDeveloperGuy commented 7 years ago

As far as I understand it, the hmd_presence (USB) VID/PID is there so that SteamVR can do a hardware presence check without having to load the driver, whereas the (Monitor) Edid properties are used to tell SteamVR which "monitor" the HMD is, for the purposes of enabling "direct mode" and getting the HMD output onto the correct (HDMI) screen.

These two VID/PID combinations will most likely never be the same, as one is referring to the USB (tracking) aspect of the HMD, whereas the other is referring to the Monitor (display) aspect of the HMD.

dashingstag commented 7 years ago

the hmd_presence (USB) VID/PID is there so that SteamVR can do a hardware presence check without having to load the driver

Is this exposed to the openvr driver sdk? or is it internal to steamvr? What happens if steamvr do or do not know the presence of that usb device? Won't it try to load the driver anyway?

TheDeveloperGuy commented 7 years ago

The VID/PID combination is in the driver manifest. I don't know what you mean "exposed". All I know is that it doesn't work properly on all machines (ie. it will try to load the driver anyway when USB device is not present, and on other machines will fail when device is present). It seems that this check is just for HMD and SteamVR will load the driver anyway (but then fail initialisation and fail to send the driver frames if the check fails).