openvr: Support v1.3.22

This commit is contained in:
Andrew Eikum 2019-06-28 14:25:08 -05:00
parent 94568eaa23
commit 27b0d4083d
33 changed files with 5248 additions and 56 deletions

View file

@ -12,6 +12,7 @@ import os
import re
sdk_versions = [
"v1.3.22",
"v1.2.10",
"v1.1.3b",
"v1.0.17",

View file

@ -0,0 +1,36 @@
//========= Copyright Valve Corporation ============//
//
#include "openvr.h"
namespace vr
{
class IVRClientCore
{
public:
/** Initializes the system */
virtual EVRInitError Init( vr::EVRApplicationType eApplicationType, const char *pStartupInfo ) = 0;
/** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */
virtual void Cleanup() = 0;
/** checks to see if the specified interface/version is supported in this vrclient.dll */
virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0;
/** Retrieves any interface from vrclient.dll */
virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0;
/** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */
virtual bool BIsHmdPresent() = 0;
/** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */
virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0;
/** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */
virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0;
};
static const char * const IVRClientCore_Version = "IVRClientCore_003";
}

File diff suppressed because it is too large Load diff

View file

@ -2546,6 +2546,12 @@ EVRInputError __thiscall IVRInput_005_ShowBindingsForActionSet(void *_this, VRAc
return 0;
}
bool __thiscall IVRInput_005_IsUsingLegacyInput(void *_this)
{
push_ptr_parameter(_this);
return 0;
}
EIOBufferError __thiscall IVRIOBuffer_002_Open(void *_this, const char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer)
{
push_ptr_parameter(_this);

View file

@ -671,6 +671,8 @@ EVRInputError __thiscall IVRInput_005_ShowActionOrigins(void *_this, VRActionSet
EVRInputError __thiscall IVRInput_005_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight);
bool __thiscall IVRInput_005_IsUsingLegacyInput(void *_this);
void test_capi_thunks_IVRIOBuffer_002(void);
EIOBufferError __thiscall IVRIOBuffer_002_Open(void *_this, const char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer);

View file

@ -3009,6 +3009,13 @@ void test_capi_thunks_IVRInput_005(void)
check_uint32_parameter("IVRInput_005_ShowBindingsForActionSet", 2);
check_uint32_parameter("IVRInput_005_ShowBindingsForActionSet", 3);
check_uint64_parameter("IVRInput_005_ShowBindingsForActionSet", 4);
init_thunk(t, this_ptr_value, IVRInput_005_IsUsingLegacyInput, 0, FALSE, FALSE);
bool (__stdcall *capi_IVRInput_005_IsUsingLegacyInput)() = (void *)t;
clear_parameters();
capi_IVRInput_005_IsUsingLegacyInput();
check_ptr_parameter("IVRInput_005_IsUsingLegacyInput", this_ptr_value);
VirtualFree(t, 0, MEM_RELEASE);
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.2.10/ivrclientcore.h"
#include "openvr_v1.3.22/ivrclientcore.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"
@ -129,6 +129,11 @@ vr::EVRInputError cppIVRInput_IVRInput_005_ShowBindingsForActionSet(void *linux_
return ((IVRInput*)linux_side)->ShowBindingsForActionSet((vr::VRActiveActionSet_t *)pSets, (uint32_t)unSizeOfVRSelectedActionSet_t, (uint32_t)unSetCount, (vr::VRInputValueHandle_t)originToHighlight);
}
bool cppIVRInput_IVRInput_005_IsUsingLegacyInput(void *linux_side)
{
return ((IVRInput*)linux_side)->IsUsingLegacyInput();
}
#ifdef __cplusplus
}
#endif

View file

@ -25,6 +25,7 @@ extern EVRInputError cppIVRInput_IVRInput_005_GetOriginLocalizedName(void *, VRI
extern EVRInputError cppIVRInput_IVRInput_005_GetOriginTrackedDeviceInfo(void *, VRInputValueHandle_t, InputOriginInfo_t *, uint32_t);
extern EVRInputError cppIVRInput_IVRInput_005_ShowActionOrigins(void *, VRActionSetHandle_t, VRActionHandle_t);
extern EVRInputError cppIVRInput_IVRInput_005_ShowBindingsForActionSet(void *, VRActiveActionSet_t *, uint32_t, uint32_t, VRInputValueHandle_t);
extern bool cppIVRInput_IVRInput_005_IsUsingLegacyInput(void *);
#ifdef __cplusplus
}
#endif

View file

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

View file

@ -1,6 +1,6 @@
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.2.10/ivrclientcore.h"
#include "openvr_v1.3.22/ivrclientcore.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"
@ -234,12 +234,12 @@ vr::EVROverlayError cppIVROverlay_IVROverlay_019_GetTransformForOverlayCoordinat
return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform);
}
bool cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent)
bool cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent)
{
VREvent_t lin;
bool _ret;
_ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin));
struct_VREvent_t_1210_lin_to_win(&lin, pEvent);
struct_VREvent_t_1322_lin_to_win(&lin, pEvent);
return _ret;
}

View file

@ -46,7 +46,7 @@ extern EVROverlayError cppIVROverlay_IVROverlay_019_ShowOverlay(void *, VROverla
extern EVROverlayError cppIVROverlay_IVROverlay_019_HideOverlay(void *, VROverlayHandle_t);
extern bool cppIVROverlay_IVROverlay_019_IsOverlayVisible(void *, VROverlayHandle_t);
extern EVROverlayError cppIVROverlay_IVROverlay_019_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *);
extern bool cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_1210 *, uint32_t);
extern bool cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_1322 *, uint32_t);
extern EVROverlayError cppIVROverlay_IVROverlay_019_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *);
extern EVROverlayError cppIVROverlay_IVROverlay_019_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod);
extern EVROverlayError cppIVROverlay_IVROverlay_019_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *);

View file

@ -1,6 +1,6 @@
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.2.10/ivrclientcore.h"
#include "openvr_v1.3.22/ivrclientcore.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"
@ -9,34 +9,34 @@ extern "C" {
#ifdef __cplusplus
extern "C" {
#endif
vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_1210 ** ppRenderModel)
vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_1322 ** ppRenderModel)
{
RenderModel_t *lin;
vr::EVRRenderModelError _ret;
_ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin);
if(_ret == 0)
*ppRenderModel = struct_RenderModel_t_1210_wrap(lin);
*ppRenderModel = struct_RenderModel_t_1322_wrap(lin);
return _ret;
}
void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *linux_side, winRenderModel_t_1210 * pRenderModel)
void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *linux_side, winRenderModel_t_1322 * pRenderModel)
{
((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_1210_unwrap(pRenderModel));
((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_1322_unwrap(pRenderModel));
}
vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_1210 ** ppTexture)
vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_1322 ** ppTexture)
{
RenderModel_TextureMap_t *lin;
vr::EVRRenderModelError _ret;
_ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin);
if(_ret == 0)
*ppTexture = struct_RenderModel_TextureMap_t_1210_wrap(lin);
*ppTexture = struct_RenderModel_TextureMap_t_1322_wrap(lin);
return _ret;
}
void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_1210 * pTexture)
void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_1322 * pTexture)
{
((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_1210_unwrap(pTexture));
((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_1322_unwrap(pTexture));
}
vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTextureD3D11_Async(void *linux_side, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D)

View file

@ -1,10 +1,10 @@
#ifdef __cplusplus
extern "C" {
#endif
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *, const char *, winRenderModel_t_1210 **);
extern void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *, winRenderModel_t_1210 *);
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_1210 **);
extern void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *, winRenderModel_TextureMap_t_1210 *);
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *, const char *, winRenderModel_t_1322 **);
extern void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *, winRenderModel_t_1322 *);
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_1322 **);
extern void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *, winRenderModel_TextureMap_t_1322 *);
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTextureD3D11_Async(void *, TextureID_t, void *, void **);
extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadIntoTextureD3D11_Async(void *, TextureID_t, void *);
extern void cppIVRRenderModels_IVRRenderModels_006_FreeTextureD3D11(void *, void *);

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.2.10/ivrclientcore.h"
#include "openvr_v1.3.22/ivrclientcore.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"
@ -159,21 +159,21 @@ const char * cppIVRSystem_IVRSystem_019_GetPropErrorNameFromEnum(void *linux_sid
return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error);
}
bool cppIVRSystem_IVRSystem_019_PollNextEvent(void *linux_side, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent)
bool cppIVRSystem_IVRSystem_019_PollNextEvent(void *linux_side, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent)
{
VREvent_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin));
struct_VREvent_t_1210_lin_to_win(&lin, pEvent);
struct_VREvent_t_1322_lin_to_win(&lin, pEvent);
return _ret;
}
bool cppIVRSystem_IVRSystem_019_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose)
bool cppIVRSystem_IVRSystem_019_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose)
{
VREvent_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VREvent_t_1210_lin_to_win(&lin, pEvent);
struct_VREvent_t_1322_lin_to_win(&lin, pEvent);
return _ret;
}
@ -187,21 +187,21 @@ vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_019_GetHiddenAreaMesh(void *linux_si
return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type);
}
bool cppIVRSystem_IVRSystem_019_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1210 * pControllerState, uint32_t unControllerStateSize)
bool cppIVRSystem_IVRSystem_019_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1322 * pControllerState, uint32_t unControllerStateSize)
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin));
struct_VRControllerState001_t_1210_lin_to_win(&lin, pControllerState);
struct_VRControllerState001_t_1322_lin_to_win(&lin, pControllerState);
return _ret;
}
bool cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1210 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose)
bool cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1322 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose)
{
VRControllerState001_t lin;
bool _ret;
_ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose);
struct_VRControllerState001_t_1210_lin_to_win(&lin, pControllerState);
struct_VRControllerState001_t_1322_lin_to_win(&lin, pControllerState);
return _ret;
}

View file

@ -31,12 +31,12 @@ extern HmdMatrix34_t cppIVRSystem_IVRSystem_019_GetMatrix34TrackedDeviceProperty
extern uint32_t cppIVRSystem_IVRSystem_019_GetArrayTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, PropertyTypeTag_t, void *, uint32_t, ETrackedPropertyError *);
extern uint32_t cppIVRSystem_IVRSystem_019_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *);
extern const char * cppIVRSystem_IVRSystem_019_GetPropErrorNameFromEnum(void *, ETrackedPropertyError);
extern bool cppIVRSystem_IVRSystem_019_PollNextEvent(void *, winVREvent_t_1210 *, uint32_t);
extern bool cppIVRSystem_IVRSystem_019_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_1210 *, uint32_t, TrackedDevicePose_t *);
extern bool cppIVRSystem_IVRSystem_019_PollNextEvent(void *, winVREvent_t_1322 *, uint32_t);
extern bool cppIVRSystem_IVRSystem_019_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_1322 *, uint32_t, TrackedDevicePose_t *);
extern const char * cppIVRSystem_IVRSystem_019_GetEventTypeNameFromEnum(void *, EVREventType);
extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_019_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType);
extern bool cppIVRSystem_IVRSystem_019_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_1210 *, uint32_t);
extern bool cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_1210 *, uint32_t, TrackedDevicePose_t *);
extern bool cppIVRSystem_IVRSystem_019_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_1322 *, uint32_t);
extern bool cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_1322 *, uint32_t, TrackedDevicePose_t *);
extern void cppIVRSystem_IVRSystem_019_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short);
extern const char * cppIVRSystem_IVRSystem_019_GetButtonIdNameFromEnum(void *, EVRButtonId);
extern const char * cppIVRSystem_IVRSystem_019_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType);

View file

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

View file

@ -1,3 +1,13 @@
typedef struct winVREvent_t_1322 winVREvent_t_1322;
extern void struct_VREvent_t_1322_lin_to_win(void *l, void *w);
typedef struct winVRControllerState001_t_1322 winVRControllerState001_t_1322;
extern void struct_VRControllerState001_t_1322_lin_to_win(void *l, void *w);
typedef struct winRenderModel_TextureMap_t_1322 winRenderModel_TextureMap_t_1322;
extern struct winRenderModel_TextureMap_t_1322 *struct_RenderModel_TextureMap_t_1322_wrap(void *l);
extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1322_unwrap(winRenderModel_TextureMap_t_1322 *w);
typedef struct winRenderModel_t_1322 winRenderModel_t_1322;
extern struct winRenderModel_t_1322 *struct_RenderModel_t_1322_wrap(void *l);
extern RenderModel_t *struct_RenderModel_t_1322_unwrap(winRenderModel_t_1322 *w);
typedef struct winVREvent_t_1210 winVREvent_t_1210;
extern void struct_VREvent_t_1210_lin_to_win(void *l, void *w);
typedef struct winVRControllerState001_t_1210 winVRControllerState001_t_1210;

View file

@ -0,0 +1,108 @@
#include <stdlib.h>
#include <string.h>
#include "vrclient_private.h"
#include "vrclient_defs.h"
#include "openvr_v1.3.22/openvr.h"
using namespace vr;
extern "C" {
#include "struct_converters.h"
#pragma pack(push, 8)
struct winVREvent_t_1322 {
uint32_t eventType;
vr::TrackedDeviceIndex_t trackedDeviceIndex;
float eventAgeSeconds;
vr::VREvent_Data_t data;
} __attribute__ ((ms_struct));
#pragma pack(pop)
void struct_VREvent_t_1322_lin_to_win(void *l, void *w)
{
struct winVREvent_t_1322 *win = (struct winVREvent_t_1322 *)w;
VREvent_t *lin = (VREvent_t *)l;
win->eventType = lin->eventType;
win->trackedDeviceIndex = lin->trackedDeviceIndex;
win->eventAgeSeconds = lin->eventAgeSeconds;
win->data = lin->data;
}
#pragma pack(push, 8)
struct winVRControllerState001_t_1322 {
uint32_t unPacketNum;
uint64_t ulButtonPressed;
uint64_t ulButtonTouched;
vr::VRControllerAxis_t rAxis[5];
} __attribute__ ((ms_struct));
#pragma pack(pop)
void struct_VRControllerState001_t_1322_lin_to_win(void *l, void *w)
{
struct winVRControllerState001_t_1322 *win = (struct winVRControllerState001_t_1322 *)w;
VRControllerState001_t *lin = (VRControllerState001_t *)l;
win->unPacketNum = lin->unPacketNum;
win->ulButtonPressed = lin->ulButtonPressed;
win->ulButtonTouched = lin->ulButtonTouched;
memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis));
}
#pragma pack(push, 8)
struct winRenderModel_TextureMap_t_1322 {
uint16_t unWidth;
uint16_t unHeight;
const uint8_t * rubTextureMapData;
RenderModel_TextureMap_t *linux_side;
} __attribute__ ((ms_struct));
#pragma pack(pop)
struct winRenderModel_TextureMap_t_1322 *struct_RenderModel_TextureMap_t_1322_wrap(void *l)
{
struct winRenderModel_TextureMap_t_1322 *win = (struct winRenderModel_TextureMap_t_1322 *)malloc(sizeof(*win));
RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l;
win->unWidth = lin->unWidth;
win->unHeight = lin->unHeight;
win->rubTextureMapData = lin->rubTextureMapData;
win->linux_side = lin;
return win;
}
struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1322_unwrap(winRenderModel_TextureMap_t_1322 *w)
{
RenderModel_TextureMap_t *ret = w->linux_side;
free(w);
return ret;
}
#pragma pack(push, 8)
struct winRenderModel_t_1322 {
const vr::RenderModel_Vertex_t * rVertexData;
uint32_t unVertexCount;
const uint16_t * rIndexData;
uint32_t unTriangleCount;
vr::TextureID_t diffuseTextureId;
RenderModel_t *linux_side;
} __attribute__ ((ms_struct));
#pragma pack(pop)
struct winRenderModel_t_1322 *struct_RenderModel_t_1322_wrap(void *l)
{
struct winRenderModel_t_1322 *win = (struct winRenderModel_t_1322 *)malloc(sizeof(*win));
RenderModel_t *lin = (RenderModel_t *)l;
win->rVertexData = lin->rVertexData;
win->unVertexCount = lin->unVertexCount;
win->rIndexData = lin->rIndexData;
win->unTriangleCount = lin->unTriangleCount;
win->diffuseTextureId = lin->diffuseTextureId;
win->linux_side = lin;
return win;
}
struct RenderModel_t *struct_RenderModel_t_1322_unwrap(winRenderModel_t_1322 *w)
{
RenderModel_t *ret = w->linux_side;
free(w);
return ret;
}
}

View file

@ -195,6 +195,13 @@ EVRInputError __thiscall winIVRInput_IVRInput_005_ShowBindingsForActionSet(winIV
return cppIVRInput_IVRInput_005_ShowBindingsForActionSet(_this->linux_side, pSets, unSizeOfVRSelectedActionSet_t, unSetCount, originToHighlight);
}
DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_005_IsUsingLegacyInput, 4)
bool __thiscall winIVRInput_IVRInput_005_IsUsingLegacyInput(winIVRInput_IVRInput_005 *_this)
{
TRACE("%p\n", _this);
return cppIVRInput_IVRInput_005_IsUsingLegacyInput(_this->linux_side);
}
extern vtable_ptr winIVRInput_IVRInput_005_vtable;
#ifndef __GNUC__
@ -225,6 +232,7 @@ void __asm_dummy_vtables(void) {
VTABLE_ADD_FUNC(winIVRInput_IVRInput_005_GetOriginTrackedDeviceInfo)
VTABLE_ADD_FUNC(winIVRInput_IVRInput_005_ShowActionOrigins)
VTABLE_ADD_FUNC(winIVRInput_IVRInput_005_ShowBindingsForActionSet)
VTABLE_ADD_FUNC(winIVRInput_IVRInput_005_IsUsingLegacyInput)
);
#ifndef __GNUC__
}
@ -248,8 +256,8 @@ void destroy_winIVRInput_IVRInput_005(void *object)
winIVRInput_IVRInput_005 *create_winIVRInput_IVRInput_005_FnTable(void *linux_side)
{
winIVRInput_IVRInput_005 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRInput_IVRInput_005));
struct thunk *thunks = alloc_thunks(24);
struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 24 * sizeof(*vtable));
struct thunk *thunks = alloc_thunks(25);
struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 25 * sizeof(*vtable));
int i;
TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks);
@ -277,7 +285,8 @@ winIVRInput_IVRInput_005 *create_winIVRInput_IVRInput_005_FnTable(void *linux_si
init_thunk(&thunks[21], r, winIVRInput_IVRInput_005_GetOriginTrackedDeviceInfo, 3, FALSE, FALSE);
init_thunk(&thunks[22], r, winIVRInput_IVRInput_005_ShowActionOrigins, 2, FALSE, FALSE);
init_thunk(&thunks[23], r, winIVRInput_IVRInput_005_ShowBindingsForActionSet, 4, FALSE, FALSE);
for (i = 0; i < 24; i++)
init_thunk(&thunks[24], r, winIVRInput_IVRInput_005_IsUsingLegacyInput, 0, FALSE, FALSE);
for (i = 0; i < 25; i++)
vtable[i] = &thunks[i];
r->linux_side = linux_side;
r->vtable = (void *)vtable;

View file

@ -341,7 +341,7 @@ EVROverlayError __thiscall winIVROverlay_IVROverlay_019_GetTransformForOverlayCo
}
DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_019_PollNextOverlayEvent, 24)
bool __thiscall winIVROverlay_IVROverlay_019_PollNextOverlayEvent(winIVROverlay_IVROverlay_019 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent)
bool __thiscall winIVROverlay_IVROverlay_019_PollNextOverlayEvent(winIVROverlay_IVROverlay_019 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent)
{
TRACE("%p\n", _this);
return cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent);

View file

@ -26,28 +26,28 @@ typedef struct __winIVRRenderModels_IVRRenderModels_006 {
} winIVRRenderModels_IVRRenderModels_006;
DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async, 20)
EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_006 *_this, const char * pchRenderModelName, winRenderModel_t_1210 ** ppRenderModel)
EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_006 *_this, const char * pchRenderModelName, winRenderModel_t_1322 ** ppRenderModel)
{
TRACE("%p\n", _this);
return cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(_this->linux_side, pchRenderModelName, ppRenderModel);
}
DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_FreeRenderModel, 12)
void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeRenderModel(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_t_1210 * pRenderModel)
void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeRenderModel(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_t_1322 * pRenderModel)
{
TRACE("%p\n", _this);
cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(_this->linux_side, pRenderModel);
}
DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async, 16)
EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_006 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_1210 ** ppTexture)
EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_006 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_1322 ** ppTexture)
{
TRACE("%p\n", _this);
return cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(_this->linux_side, textureId, ppTexture);
}
DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_FreeTexture, 12)
void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeTexture(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_TextureMap_t_1210 * pTexture)
void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeTexture(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_TextureMap_t_1322 * pTexture)
{
TRACE("%p\n", _this);
cppIVRRenderModels_IVRRenderModels_006_FreeTexture(_this->linux_side, pTexture);

View file

@ -241,14 +241,14 @@ const char * __thiscall winIVRSystem_IVRSystem_019_GetPropErrorNameFromEnum(winI
}
DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_019_PollNextEvent, 16)
bool __thiscall winIVRSystem_IVRSystem_019_PollNextEvent(winIVRSystem_IVRSystem_019 *_this, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent)
bool __thiscall winIVRSystem_IVRSystem_019_PollNextEvent(winIVRSystem_IVRSystem_019 *_this, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent)
{
TRACE("%p\n", _this);
return cppIVRSystem_IVRSystem_019_PollNextEvent(_this->linux_side, pEvent, uncbVREvent);
}
DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_019_PollNextEventWithPose, 28)
bool __thiscall winIVRSystem_IVRSystem_019_PollNextEventWithPose(winIVRSystem_IVRSystem_019 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_1210 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose)
bool __thiscall winIVRSystem_IVRSystem_019_PollNextEventWithPose(winIVRSystem_IVRSystem_019 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_1322 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose)
{
TRACE("%p\n", _this);
return cppIVRSystem_IVRSystem_019_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose);
@ -270,14 +270,14 @@ HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_019_GetHiddenAreaMesh(winIVR
}
DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_019_GetControllerState, 20)
bool __thiscall winIVRSystem_IVRSystem_019_GetControllerState(winIVRSystem_IVRSystem_019 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1210 * pControllerState, uint32_t unControllerStateSize)
bool __thiscall winIVRSystem_IVRSystem_019_GetControllerState(winIVRSystem_IVRSystem_019 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1322 * pControllerState, uint32_t unControllerStateSize)
{
TRACE("%p\n", _this);
return cppIVRSystem_IVRSystem_019_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize);
}
DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_019_GetControllerStateWithPose, 32)
bool __thiscall winIVRSystem_IVRSystem_019_GetControllerStateWithPose(winIVRSystem_IVRSystem_019 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1210 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose)
bool __thiscall winIVRSystem_IVRSystem_019_GetControllerStateWithPose(winIVRSystem_IVRSystem_019 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1322 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose)
{
TRACE("%p\n", _this);
return cppIVRSystem_IVRSystem_019_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose);