File tree 2 files changed +11
-0
lines changed 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ To update, update the submodule then bindgen on wrapper.h
2
+
3
+ The following structs must be marked ` #[cfg_attr(unix, repr(packed))] ` to work around OpenVR's broken ABI on Linux/OSX:
4
+ - ` VRControllerState_t `
5
+ - ` RenderModel_TextureMap_t `
6
+ - ` RenderModel_t `
7
+ - ` VREvent_t `
Original file line number Diff line number Diff line change @@ -3060,6 +3060,7 @@ impl Clone for VRControllerAxis_t {
3060
3060
}
3061
3061
#[ repr( C ) ]
3062
3062
#[ derive( Debug , Copy ) ]
3063
+ #[ cfg_attr( unix, repr( packed) ) ]
3063
3064
pub struct VRControllerState_t {
3064
3065
pub unPacketNum : u32 ,
3065
3066
pub ulButtonPressed : u64 ,
@@ -3855,6 +3856,7 @@ impl Clone for RenderModel_Vertex_t {
3855
3856
}
3856
3857
#[ repr( C ) ]
3857
3858
#[ derive( Debug , Copy ) ]
3859
+ #[ cfg_attr( unix, repr( packed) ) ]
3858
3860
pub struct RenderModel_TextureMap_t {
3859
3861
pub unWidth : u16 ,
3860
3862
pub unHeight : u16 ,
@@ -3893,6 +3895,7 @@ impl Clone for RenderModel_TextureMap_t {
3893
3895
}
3894
3896
#[ repr( C ) ]
3895
3897
#[ derive( Debug , Copy ) ]
3898
+ #[ cfg_attr( unix, repr( packed) ) ]
3896
3899
pub struct RenderModel_t {
3897
3900
pub rVertexData : * mut RenderModel_Vertex_t ,
3898
3901
pub unVertexCount : u32 ,
@@ -4196,6 +4199,7 @@ impl Clone for VREvent_Data_t {
4196
4199
/// An event posted by the server to all running applications
4197
4200
#[ repr( C ) ]
4198
4201
#[ derive( Copy ) ]
4202
+ #[ cfg_attr( unix, repr( packed) ) ]
4199
4203
pub struct VREvent_t {
4200
4204
pub eventType : u32 ,
4201
4205
pub trackedDeviceIndex : TrackedDeviceIndex_t ,
You can’t perform that action at this time.
0 commit comments