openvr icon indicating copy to clipboard operation
openvr copied to clipboard

How to convert VREvent_t messages to strings?

Open Wyverex42 opened this issue 1 year ago • 3 comments

Some of the structs in the VREvent_Data_t union have uint64_t members which seem to refer to strings, e.g.

struct VREvent_InputActionManifestLoad_t
{
	uint64_t pathAppKey;
	uint64_t pathMessage;
	uint64_t pathMessageParam;
	uint64_t pathManifestPath;
};

How do I convert pathMessage or pathManifestPath in this struct into a string that I can use?

I haven't found any documentation or example code for this

Wyverex42 avatar Mar 05 '23 10:03 Wyverex42

They're likely just pointers to null terminated char arrays, with the variable name prefixes being pch misspelled. Guessing the manifest path will be identical to what is passed into IVRInput::SetActionManifestPath( const char *pchActionManifestPath )

Rectus avatar Mar 06 '23 21:03 Rectus

I tried casting to const char* but sadly they don't seem to be char arrays, I just get garbage

Wyverex42 avatar Mar 10 '23 21:03 Wyverex42

Looking at it more, it seems like the values are close to the action and input source handles in the input system. Guessing they are handles for a system that is not exposed in the public API.

Rectus avatar Mar 11 '23 17:03 Rectus