From 8709a410dc59dcb042f227953e4510534128fe55 Mon Sep 17 00:00:00 2001 From: dsc Date: Sat, 27 Mar 2021 22:26:08 +0100 Subject: [PATCH] This structure was originally defined mis-packed on Linux, preserved for compatibility. --- headers/openvr_capi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index 13c71fc..3c32c59 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -2202,6 +2202,11 @@ typedef struct VRControllerAxis_t float y; } VRControllerAxis_t; +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif typedef struct VRControllerState_t { uint32_t unPacketNum; @@ -2209,6 +2214,9 @@ typedef struct VRControllerState_t uint64_t ulButtonTouched; struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5] } VRControllerState_t; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif typedef struct CameraVideoStreamFrameHeader_t {