vrclient: Pass Linux struct size to Linux GetControllerState

This commit is contained in:
Andrew Eikum 2018-02-02 10:59:21 -06:00
parent 68443426f9
commit 6b5f94f2ef
9 changed files with 16 additions and 14 deletions

View file

@ -1,6 +1,6 @@
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.0.11/ivrclientcore.h"
#include "openvr_v1.0.12/ivrclientcore.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"

View file

@ -181,7 +181,7 @@ bool cppIVRSystem_IVRSystem_014_GetControllerState(void *linux_side, TrackedDevi
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize);
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState);
return _ret;
}
@ -190,7 +190,7 @@ bool cppIVRSystem_IVRSystem_014_GetControllerStateWithPose(void *linux_side, ETr
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -181,7 +181,7 @@ bool cppIVRSystem_IVRSystem_015_GetControllerState(void *linux_side, TrackedDevi
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize);
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState);
return _ret;
}
@ -190,7 +190,7 @@ bool cppIVRSystem_IVRSystem_015_GetControllerStateWithPose(void *linux_side, ETr
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -186,7 +186,7 @@ bool cppIVRSystem_IVRSystem_016_GetControllerState(void *linux_side, TrackedDevi
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize);
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState);
return _ret;
}
@ -195,7 +195,7 @@ bool cppIVRSystem_IVRSystem_016_GetControllerStateWithPose(void *linux_side, ETr
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -186,7 +186,7 @@ bool cppIVRSystem_IVRSystem_017_GetControllerState(void *linux_side, TrackedDevi
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize);
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState);
return _ret;
}
@ -195,7 +195,7 @@ bool cppIVRSystem_IVRSystem_017_GetControllerStateWithPose(void *linux_side, ETr
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -191,7 +191,7 @@ bool cppIVRSystem_IVRSystem_019_GetControllerState(void *linux_side, TrackedDevi
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize);
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_1012_lin_to_win(&lin, pControllerState);
return _ret;
}
@ -200,7 +200,7 @@ bool cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(void *linux_side, ETr
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_1012_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -266,7 +266,9 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
if do_lin_to_win and do_lin_to_win[1] == param.spelling or \
do_wrap and do_wrap[1] == param.spelling:
cpp.write("&lin")
if do_lin_to_win and do_lin_to_win[0] == "VREvent_t":
if do_lin_to_win and \
(do_lin_to_win[0] == "VREvent_t" or \
do_lin_to_win[0] == "VRControllerState001_t"):
next_is_size = True
elif do_unwrap and do_unwrap[1] == param.spelling:
cpp.write("struct_%s_%s_unwrap(%s)" % (strip_ns(do_unwrap[0]), display_sdkver(sdkver), do_unwrap[1]))

View file

@ -12,9 +12,9 @@ extern void *create_winIVRTrackedCamera_IVRTrackedCamera_003(void *);
extern void *create_winIVRScreenshots_IVRScreenshots_001(void *);
extern void *create_winIVRResources_IVRResources_001(void *);
extern void *create_winIVRDriverManager_IVRDriverManager_001(void *);
extern void *create_winIVRClientCore_IVRClientCore_003(void *);
extern void *create_winIVRSystem_IVRSystem_017(void *);
extern void *create_winIVROverlay_IVROverlay_017(void *);
extern void *create_winIVRClientCore_IVRClientCore_003(void *);
extern void *create_winIVRCompositor_IVRCompositor_021(void *);
extern void *create_winIVROverlay_IVROverlay_016(void *);
extern void *create_winIVRSystem_IVRSystem_016(void *);

View file

@ -12,9 +12,9 @@
{"IVRScreenshots_001", &create_winIVRScreenshots_IVRScreenshots_001},
{"IVRResources_001", &create_winIVRResources_IVRResources_001},
{"IVRDriverManager_001", &create_winIVRDriverManager_IVRDriverManager_001},
{"IVRClientCore_003", &create_winIVRClientCore_IVRClientCore_003},
{"IVRSystem_017", &create_winIVRSystem_IVRSystem_017},
{"IVROverlay_017", &create_winIVROverlay_IVROverlay_017},
{"IVRClientCore_003", &create_winIVRClientCore_IVRClientCore_003},
{"IVRCompositor_021", &create_winIVRCompositor_IVRCompositor_021},
{"IVROverlay_016", &create_winIVROverlay_IVROverlay_016},
{"IVRSystem_016", &create_winIVRSystem_IVRSystem_016},