vrclient: Simplify next-is-size handling a bit.

CW-Bug-Id: #22729
This commit is contained in:
Rémi Bernon 2023-09-23 17:54:08 +02:00 committed by Arkadiusz Hiler
parent 4fc0934c83
commit 1909c6d441
36 changed files with 218 additions and 124 deletions

View file

@ -155,7 +155,8 @@ bool cppIVRSystem_IVRSystem_011_PollNextEvent(void *linux_side, winVREvent_t_091
bool _ret;
if(pEvent)
struct_VREvent_t_0918_win_to_lin(pEvent, &lin);
_ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0);
uncbVREvent = uncbVREvent ? sizeof(lin) : 0;
_ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, (uint32_t)uncbVREvent);
if(pEvent)
struct_VREvent_t_0918_lin_to_win(&lin, pEvent, uncbVREvent);
return _ret;
@ -167,7 +168,8 @@ bool cppIVRSystem_IVRSystem_011_PollNextEventWithPose(void *linux_side, ETrackin
bool _ret;
if(pEvent)
struct_VREvent_t_0918_win_to_lin(pEvent, &lin);
_ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
uncbVREvent = uncbVREvent ? sizeof(lin) : 0;
_ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (uint32_t)uncbVREvent, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
if(pEvent)
struct_VREvent_t_0918_lin_to_win(&lin, pEvent, uncbVREvent);
return _ret;