2018-01-18 22:29:49 +03:00
|
|
|
#include "vrclient_private.h"
|
|
|
|
#include "vrclient_defs.h"
|
|
|
|
#include "openvr_v1.0.7/ivrclientcore.h"
|
|
|
|
using namespace vr;
|
|
|
|
extern "C" {
|
|
|
|
#include "struct_converters.h"
|
|
|
|
}
|
|
|
|
#include "cppIVRSystem_IVRSystem_015.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2023-09-23 17:11:42 +03:00
|
|
|
void cppIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize(void *linux_side, uint32_t *pnWidth, uint32_t *pnHeight)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight);
|
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix44_t cppIVRSystem_IVRSystem_015_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix44_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
void cppIVRSystem_IVRSystem_015_GetProjectionRaw(void *linux_side, EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom);
|
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV, (vr::DistortionCoordinates_t *)pDistortionCoordinates);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetEyeToHeadTransform(void *linux_side, EVREye eEye)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_GetTimeSinceLastVsync(void *linux_side, float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
int32_t cppIVRSystem_IVRSystem_015_GetD3D9AdapterIndex(void *linux_side)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
int32_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetD3D9AdapterIndex();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
void cppIVRSystem_IVRSystem_015_GetDXGIOutputInfo(void *linux_side, int32_t *pnAdapterIndex)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cppIVRSystem_IVRSystem_015_IsDisplayOnDesktop(void *linux_side)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->IsDisplayOnDesktop();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bool cppIVRSystem_IVRSystem_015_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
void cppIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cppIVRSystem_IVRSystem_015_ResetSeatedZeroPose(void *linux_side)
|
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->ResetSeatedZeroPose();
|
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
uint32_t cppIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
uint32_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
EDeviceActivityLevel cppIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
EDeviceActivityLevel _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:19:05 +03:00
|
|
|
void cppIVRSystem_IVRSystem_015_ApplyTransform(void *linux_side, TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform);
|
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
TrackedDeviceIndex_t cppIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
TrackedDeviceIndex_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
ETrackedControllerRole cppIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
ETrackedControllerRole _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
ETrackedDeviceClass cppIVRSystem_IVRSystem_015_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
ETrackedDeviceClass _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bool cppIVRSystem_IVRSystem_015_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
float cppIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
float _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
int32_t cppIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
int32_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
uint64_t cppIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
uint64_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HmdMatrix34_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
uint32_t cppIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
uint32_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
const char * cppIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error)
|
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
const char *_ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_PollNextEvent(void *linux_side, winVREvent_t_107 *pEvent, uint32_t uncbVREvent)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
bool _ret;
|
2023-09-27 15:09:21 +03:00
|
|
|
VREvent_t lin_pEvent;
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pEvent)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VREvent_t_107_win_to_lin(pEvent, &lin_pEvent);
|
|
|
|
uint32_t lin_uncbVREvent = uncbVREvent ? sizeof(lin_pEvent) : 0;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin_pEvent : nullptr, lin_uncbVREvent);
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pEvent)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VREvent_t_107_lin_to_win(&lin_pEvent, pEvent, uncbVREvent);
|
2018-01-18 22:29:49 +03:00
|
|
|
return _ret;
|
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_107 *pEvent, uint32_t uncbVREvent, TrackedDevicePose_t *pTrackedDevicePose)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
bool _ret;
|
2023-09-27 15:09:21 +03:00
|
|
|
VREvent_t lin_pEvent;
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pEvent)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VREvent_t_107_win_to_lin(pEvent, &lin_pEvent);
|
|
|
|
uint32_t lin_uncbVREvent = uncbVREvent ? sizeof(lin_pEvent) : 0;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin_pEvent : nullptr, lin_uncbVREvent, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pEvent)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VREvent_t_107_lin_to_win(&lin_pEvent, pEvent, uncbVREvent);
|
2018-01-18 22:29:49 +03:00
|
|
|
return _ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char * cppIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType)
|
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
const char *_ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
HiddenAreaMesh_t cppIVRSystem_IVRSystem_015_GetHiddenAreaMesh(void *linux_side, EVREye eEye, EHiddenAreaMeshType type)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
HiddenAreaMesh_t _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 *pControllerState, uint32_t unControllerStateSize)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
bool _ret;
|
2023-09-27 15:09:21 +03:00
|
|
|
VRControllerState001_t lin_pControllerState;
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pControllerState)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VRControllerState001_t_107_win_to_lin(pControllerState, &lin_pControllerState);
|
|
|
|
uint32_t lin_unControllerStateSize = unControllerStateSize ? sizeof(lin_pControllerState) : 0;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin_pControllerState : nullptr, lin_unControllerStateSize);
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pControllerState)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VRControllerState001_t_107_lin_to_win(&lin_pControllerState, pControllerState, unControllerStateSize);
|
2018-01-18 22:29:49 +03:00
|
|
|
return _ret;
|
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
bool cppIVRSystem_IVRSystem_015_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
|
|
|
bool _ret;
|
2023-09-27 15:09:21 +03:00
|
|
|
VRControllerState001_t lin_pControllerState;
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pControllerState)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VRControllerState001_t_107_win_to_lin(pControllerState, &lin_pControllerState);
|
|
|
|
uint32_t lin_unControllerStateSize = unControllerStateSize ? sizeof(lin_pControllerState) : 0;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin_pControllerState : nullptr, lin_unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose);
|
2023-09-27 16:18:31 +03:00
|
|
|
if (pControllerState)
|
2023-09-27 15:09:21 +03:00
|
|
|
struct_VRControllerState001_t_107_lin_to_win(&lin_pControllerState, pControllerState, unControllerStateSize);
|
2018-01-18 22:29:49 +03:00
|
|
|
return _ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void cppIVRSystem_IVRSystem_015_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec)
|
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec);
|
|
|
|
}
|
|
|
|
|
|
|
|
const char * cppIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId)
|
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
const char *_ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
const char * cppIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType)
|
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
const char *_ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bool cppIVRSystem_IVRSystem_015_CaptureInputFocus(void *linux_side)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->CaptureInputFocus();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void cppIVRSystem_IVRSystem_015_ReleaseInputFocus(void *linux_side)
|
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->ReleaseInputFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cppIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess(void *linux_side)
|
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
bool _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess();
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 17:11:42 +03:00
|
|
|
uint32_t cppIVRSystem_IVRSystem_015_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 22:44:20 +03:00
|
|
|
uint32_t _ret;
|
|
|
|
_ret = ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
2023-09-23 23:07:08 +03:00
|
|
|
EVRFirmwareError cppIVRSystem_IVRSystem_015_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex)
|
2018-01-18 22:29:49 +03:00
|
|
|
{
|
2023-09-23 23:07:08 +03:00
|
|
|
EVRFirmwareError _ret;
|
2023-09-23 22:44:20 +03:00
|
|
|
_ret = ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex);
|
|
|
|
return _ret;
|
2018-01-18 22:29:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting(void *linux_side)
|
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting();
|
|
|
|
}
|
|
|
|
|
|
|
|
void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt(void *linux_side)
|
|
|
|
{
|
|
|
|
((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt();
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|