ValveSoftware / openvr

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

Writing the OpenVR Runtime Configuration path (openvrpaths.vrpath) #548

Closed PakRaden closed 5 years ago

PakRaden commented 7 years ago

Is it possible to get OpenVR to write its own runtime path settings? (not just check if they exist)

e.g

{ "config" : [ "C:\Games\Steam\config" ], "external_drivers" : null, "jsonid" : "vrpathreg", "log" : [ "C:\Games\Steam\logs" ], "runtime" : [ "C:\steamcmd\steamapps\common\SteamVR\", "C:\steamcmd\steamapps\common\SteamVR" ], "version" : 1 }

If vrmonitor.exe was run it normally would write or update the settings based on where it ran from.

The latest version of SteamVR (build 1496873977) , neither vrmonitor.exe or vrstartup.exe reliably write all the values correctly. It'd be good to know this might be available in the OpenVR API so any config values might stay up to date in the future as versions change etc.

edit: This look like it https://github.com/ValveSoftware/openvr/blob/master/src/vrcommon/vrpathregistry_public.h but it does not allow for manual setting of the runtime, config and log directories. It only seems like you can load from a valid file, in order to save it.

natbro commented 7 years ago

hm, I'm not seeing any failure with vrmonitor or vrstartup failing to write their values?

the broader issue of the public openvr_api not having a write function is maybe a good point, we'll talk about this internally.

JulianConesa commented 5 years ago

Can you tell me where I can download the OpenXR API?

JoeLudwig commented 5 years ago

@JulianConesa You can find the latest OpenXR spec here: https://www.khronos.org/registry/OpenXR/specs/0.90/html/xrspec.html

and the SDK (with the header) is here: https://github.com/KhronosGroup/OpenXR-SDK

Note that SteamVR doesn't support OpenXR yet.

The answer to @PakRaden's question is to call vrpathreg.exe with the setting you'd like to change. That binary is in the SteamVR install at bin/win64/vrpathreg.exe.

JulianConesa commented 5 years ago

Thank you very much for your answer JoeLudwig. I'm new to OpenXR and I want to make a program with Visual Studio that accesses the VR features offered by OpenXR. Basically what I want is to visualize a graphic with the Lenovo Explorer glasses and be able to access the events provided by the controls. You can provide me with an application that you have made the general configuration steps. It would help me a lot and I would be very grateful. This topic is very broad and this is a big problem. A greeting.