From 8de08a1485b2835e604c5130ef8fb215f0892adb Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 9 Sep 2019 09:19:23 -0500 Subject: [PATCH] vrclient: Handle NULL parameters to wrapped structs --- vrclient_x64/gen_wrapper.py | 7 ++++--- .../cppIVROverlay_IVROverlay_001.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_002.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_003.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_004.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_005.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_007.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_008.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_010.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_011.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_012.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_013.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_014.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_016.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_017.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_018.cpp | 5 +++-- .../cppIVROverlay_IVROverlay_019.cpp | 5 +++-- ...cppIVRRenderModels_IVRRenderModels_002.cpp | 4 ++-- ...cppIVRRenderModels_IVRRenderModels_004.cpp | 4 ++-- ...cppIVRRenderModels_IVRRenderModels_005.cpp | 4 ++-- ...cppIVRRenderModels_IVRRenderModels_006.cpp | 4 ++-- .../cppIVRSystem_IVRSystem_003.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_004.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_005.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_006.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_009.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_010.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_011.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_012.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_014.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_015.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_016.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_017.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_019.cpp | 20 +++++++++++-------- .../cppIVRSystem_IVRSystem_020.cpp | 20 +++++++++++-------- 35 files changed, 228 insertions(+), 155 deletions(-) diff --git a/vrclient_x64/gen_wrapper.py b/vrclient_x64/gen_wrapper.py index 57bf3af2..490f9473 100755 --- a/vrclient_x64/gen_wrapper.py +++ b/vrclient_x64/gen_wrapper.py @@ -469,7 +469,7 @@ 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: cfile.write(", %s" % param.spelling) - cpp.write("&lin") + cpp.write("%s ? &lin : nullptr" % param.spelling) if do_lin_to_win and \ (do_lin_to_win[0] == "VREvent_t" or \ do_lin_to_win[0] == "VRControllerState001_t"): @@ -484,7 +484,7 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e cfile.write(", %s" % param.spelling) next_is_size = False if param.type.spelling == "uint32_t": - cpp.write("sizeof(lin)") + cpp.write("%s ? sizeof(lin) : 0" % param.spelling) else: cpp.write("(%s)%s" % (param.type.spelling, param.spelling)) elif "&" in param.type.spelling: @@ -518,7 +518,8 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e if path_conv["w2l_arrays"][i]: cfile.write(" vrclient_free_stringlist(lin_%s);\n" % path_conv["w2l_names"][i]) if do_lin_to_win: - cpp.write(" struct_%s_%s_lin_to_win(&lin, %s);\n" % (strip_ns(do_lin_to_win[0]), display_sdkver(sdkver), do_lin_to_win[1])) + cpp.write(" if(%s)\n" % do_lin_to_win[1]) + cpp.write(" struct_%s_%s_lin_to_win(&lin, %s);\n" % (strip_ns(do_lin_to_win[0]), display_sdkver(sdkver), do_lin_to_win[1])) cpp.write(" return _ret;\n") if do_wrap: cpp.write(" if(_ret == 0)\n") diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp index b55ff286..608ff5cb 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp @@ -143,8 +143,9 @@ bool cppIVROverlay_IVROverlay_001_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_092_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_092_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp index 60e21c7d..8bb7803a 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp @@ -143,8 +143,9 @@ bool cppIVROverlay_IVROverlay_002_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_094_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_094_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp index ef91a074..cfebc324 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp @@ -158,8 +158,9 @@ bool cppIVROverlay_IVROverlay_003_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_097_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_097_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp index 7434c13d..8f3975fc 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp @@ -168,8 +168,9 @@ bool cppIVROverlay_IVROverlay_004_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_098_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_098_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp index 5f6d267c..ac108b32 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp @@ -168,8 +168,9 @@ bool cppIVROverlay_IVROverlay_005_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp index f0e470da..60cb2f3f 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp @@ -168,8 +168,9 @@ bool cppIVROverlay_IVROverlay_007_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp index 2ca6e6d2..cc71b943 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp @@ -173,8 +173,9 @@ bool cppIVROverlay_IVROverlay_008_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); - struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp index d4040f6a..b29d13a9 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp @@ -183,8 +183,9 @@ bool cppIVROverlay_IVROverlay_010_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp index 548bd2f3..d69da0ed 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp @@ -193,8 +193,9 @@ bool cppIVROverlay_IVROverlay_011_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_0920_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_0920_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp index 71e7e5af..67209dd7 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp @@ -193,8 +193,9 @@ bool cppIVROverlay_IVROverlay_012_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_101_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_101_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp index 0ed8798b..dd0ab5fb 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp @@ -213,8 +213,9 @@ bool cppIVROverlay_IVROverlay_013_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_104_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_104_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp index 6b921d51..9f5f7ab0 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp @@ -213,8 +213,9 @@ bool cppIVROverlay_IVROverlay_014_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_106_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_106_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp index 1483dcfd..556251f6 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp @@ -238,8 +238,9 @@ bool cppIVROverlay_IVROverlay_016_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_1010_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1010_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp index 5a74ffea..c11ba3a5 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp @@ -238,8 +238,9 @@ bool cppIVROverlay_IVROverlay_017_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_018.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_018.cpp index d4a6d065..afe574e1 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_018.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_018.cpp @@ -238,8 +238,9 @@ bool cppIVROverlay_IVROverlay_018_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_1017_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1017_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_019.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_019.cpp index 08eedefc..9017f186 100644 --- a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_019.cpp +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_019.cpp @@ -238,8 +238,9 @@ bool cppIVROverlay_IVROverlay_019_PollNextOverlayEvent(void *linux_side, VROverl { VREvent_t lin; bool _ret; - _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); - struct_VREvent_t_1610_lin_to_win(&lin, pEvent); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1610_lin_to_win(&lin, pEvent); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp index af0a0579..f5b2c082 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp @@ -13,7 +13,7 @@ bool cppIVRRenderModels_IVRRenderModels_002_LoadRenderModel(void *linux_side, co { RenderModel_t *lin; bool _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel((const char *)pchRenderModelName, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel((const char *)pchRenderModelName, ppRenderModel ? &lin : nullptr); if(_ret == 0) *ppRenderModel = struct_RenderModel_t_0915_wrap(lin); return _ret; @@ -28,7 +28,7 @@ bool cppIVRRenderModels_IVRRenderModels_002_LoadTexture(void *linux_side, Textur { RenderModel_TextureMap_t *lin; bool _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadTexture((vr::TextureID_t)textureId, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadTexture((vr::TextureID_t)textureId, ppTexture ? &lin : nullptr); if(_ret == 0) *ppTexture = struct_RenderModel_TextureMap_t_0915_wrap(lin); return _ret; diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp index 200852f9..8e95be0a 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp @@ -13,7 +13,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadRenderModel_A { RenderModel_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, ppRenderModel ? &lin : nullptr); if(_ret == 0) *ppRenderModel = struct_RenderModel_t_0918_wrap(lin); return _ret; @@ -28,7 +28,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadTexture_Async { RenderModel_TextureMap_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, ppTexture ? &lin : nullptr); if(_ret == 0) *ppTexture = struct_RenderModel_TextureMap_t_0918_wrap(lin); return _ret; diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp index f78e679b..601fa7cf 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp @@ -13,7 +13,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadRenderModel_A { RenderModel_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, ppRenderModel ? &lin : nullptr); if(_ret == 0) *ppRenderModel = struct_RenderModel_t_1015_wrap(lin); return _ret; @@ -28,7 +28,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadTexture_Async { RenderModel_TextureMap_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, ppTexture ? &lin : nullptr); if(_ret == 0) *ppTexture = struct_RenderModel_TextureMap_t_1015_wrap(lin); return _ret; diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp index e431508e..5b6eab41 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp @@ -13,7 +13,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_A { RenderModel_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, ppRenderModel ? &lin : nullptr); if(_ret == 0) *ppRenderModel = struct_RenderModel_t_1610_wrap(lin); return _ret; @@ -28,7 +28,7 @@ vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async { RenderModel_TextureMap_t *lin; vr::EVRRenderModelError _ret; - _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin); + _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, ppTexture ? &lin : nullptr); if(_ret == 0) *ppTexture = struct_RenderModel_TextureMap_t_1610_wrap(lin); return _ret; diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp index 8fbbaad4..bd67c200 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp @@ -138,8 +138,9 @@ bool cppIVRSystem_IVRSystem_003_PollNextEvent(void *linux_side, winVREvent_t_091 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_091_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_091_lin_to_win(&lin, pEvent); return _ret; } @@ -147,8 +148,9 @@ bool cppIVRSystem_IVRSystem_003_PollNextEventWithPose(void *linux_side, Tracking { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_091_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_091_lin_to_win(&lin, pEvent); return _ret; } @@ -166,8 +168,9 @@ bool cppIVRSystem_IVRSystem_003_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); return _ret; } @@ -175,8 +178,9 @@ bool cppIVRSystem_IVRSystem_003_GetControllerStateWithPose(void *linux_side, Tra { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp index 36f84a78..df29c552 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp @@ -128,8 +128,9 @@ bool cppIVRSystem_IVRSystem_004_PollNextEvent(void *linux_side, winVREvent_t_092 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_092_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_092_lin_to_win(&lin, pEvent); return _ret; } @@ -137,8 +138,9 @@ bool cppIVRSystem_IVRSystem_004_PollNextEventWithPose(void *linux_side, Tracking { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_092_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_092_lin_to_win(&lin, pEvent); return _ret; } @@ -156,8 +158,9 @@ bool cppIVRSystem_IVRSystem_004_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); return _ret; } @@ -165,8 +168,9 @@ bool cppIVRSystem_IVRSystem_004_GetControllerStateWithPose(void *linux_side, Tra { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp index a42b5bc8..b66f8f6e 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp @@ -133,8 +133,9 @@ bool cppIVRSystem_IVRSystem_005_PollNextEvent(void *linux_side, winVREvent_t_098 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_098_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_098_lin_to_win(&lin, pEvent); return _ret; } @@ -142,8 +143,9 @@ bool cppIVRSystem_IVRSystem_005_PollNextEventWithPose(void *linux_side, Tracking { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_098_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_098_lin_to_win(&lin, pEvent); return _ret; } @@ -161,8 +163,9 @@ bool cppIVRSystem_IVRSystem_005_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); return _ret; } @@ -170,8 +173,9 @@ bool cppIVRSystem_IVRSystem_005_GetControllerStateWithPose(void *linux_side, Tra { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp index 74f44195..24f271db 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp @@ -143,8 +143,9 @@ bool cppIVRSystem_IVRSystem_006_PollNextEvent(void *linux_side, winVREvent_t_091 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); return _ret; } @@ -152,8 +153,9 @@ bool cppIVRSystem_IVRSystem_006_PollNextEventWithPose(void *linux_side, Tracking { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); return _ret; } @@ -171,8 +173,9 @@ bool cppIVRSystem_IVRSystem_006_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); return _ret; } @@ -180,8 +183,9 @@ bool cppIVRSystem_IVRSystem_006_GetControllerStateWithPose(void *linux_side, Tra { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp index a1a6d678..53aa3574 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp @@ -143,8 +143,9 @@ bool cppIVRSystem_IVRSystem_009_PollNextEvent(void *linux_side, winVREvent_t_091 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); return _ret; } @@ -152,8 +153,9 @@ bool cppIVRSystem_IVRSystem_009_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); return _ret; } @@ -171,8 +173,9 @@ bool cppIVRSystem_IVRSystem_009_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); return _ret; } @@ -180,8 +183,9 @@ bool cppIVRSystem_IVRSystem_009_GetControllerStateWithPose(void *linux_side, ETr { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp index 022827cb..30562c0b 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp @@ -153,8 +153,9 @@ bool cppIVRSystem_IVRSystem_010_PollNextEvent(void *linux_side, winVREvent_t_091 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); - struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr); + if(pEvent) + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); return _ret; } @@ -162,8 +163,9 @@ bool cppIVRSystem_IVRSystem_010_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); return _ret; } @@ -181,8 +183,9 @@ bool cppIVRSystem_IVRSystem_010_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); return _ret; } @@ -190,8 +193,9 @@ bool cppIVRSystem_IVRSystem_010_GetControllerStateWithPose(void *linux_side, ETr { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp index 8efda809..1d97ae8f 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp @@ -153,8 +153,9 @@ bool cppIVRSystem_IVRSystem_011_PollNextEvent(void *linux_side, winVREvent_t_091 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); return _ret; } @@ -162,8 +163,9 @@ bool cppIVRSystem_IVRSystem_011_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); return _ret; } @@ -181,8 +183,9 @@ bool cppIVRSystem_IVRSystem_011_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); return _ret; } @@ -190,8 +193,9 @@ bool cppIVRSystem_IVRSystem_011_GetControllerStateWithPose(void *linux_side, ETr { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp index 67a76a5f..3dccfb31 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp @@ -153,8 +153,9 @@ bool cppIVRSystem_IVRSystem_012_PollNextEvent(void *linux_side, winVREvent_t_103 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_103_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_103_lin_to_win(&lin, pEvent); return _ret; } @@ -162,8 +163,9 @@ bool cppIVRSystem_IVRSystem_012_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_103_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_103_lin_to_win(&lin, pEvent); return _ret; } @@ -181,8 +183,9 @@ bool cppIVRSystem_IVRSystem_012_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); - struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr); + if(pControllerState) + struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); return _ret; } @@ -190,8 +193,9 @@ bool cppIVRSystem_IVRSystem_012_GetControllerStateWithPose(void *linux_side, ETr { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp index 3846a81b..5b58d9c1 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp @@ -153,8 +153,9 @@ bool cppIVRSystem_IVRSystem_014_PollNextEvent(void *linux_side, winVREvent_t_104 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_104_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_104_lin_to_win(&lin, pEvent); return _ret; } @@ -162,8 +163,9 @@ bool cppIVRSystem_IVRSystem_014_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_104_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_104_lin_to_win(&lin, pEvent); return _ret; } @@ -181,8 +183,9 @@ bool cppIVRSystem_IVRSystem_014_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); return _ret; } @@ -190,8 +193,9 @@ 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, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp index 8fdbbdb1..b9a28d1a 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp @@ -153,8 +153,9 @@ bool cppIVRSystem_IVRSystem_015_PollNextEvent(void *linux_side, winVREvent_t_107 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_107_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_107_lin_to_win(&lin, pEvent); return _ret; } @@ -162,8 +163,9 @@ bool cppIVRSystem_IVRSystem_015_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_107_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_107_lin_to_win(&lin, pEvent); return _ret; } @@ -181,8 +183,9 @@ bool cppIVRSystem_IVRSystem_015_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); return _ret; } @@ -190,8 +193,9 @@ 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, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp index 64e90459..5607f839 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp @@ -158,8 +158,9 @@ bool cppIVRSystem_IVRSystem_016_PollNextEvent(void *linux_side, winVREvent_t_109 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_109_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_109_lin_to_win(&lin, pEvent); return _ret; } @@ -167,8 +168,9 @@ bool cppIVRSystem_IVRSystem_016_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_109_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_109_lin_to_win(&lin, pEvent); return _ret; } @@ -186,8 +188,9 @@ bool cppIVRSystem_IVRSystem_016_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); return _ret; } @@ -195,8 +198,9 @@ 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, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp index f4b10adc..4aa61510 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp @@ -158,8 +158,9 @@ bool cppIVRSystem_IVRSystem_017_PollNextEvent(void *linux_side, winVREvent_t_101 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); return _ret; } @@ -167,8 +168,9 @@ bool cppIVRSystem_IVRSystem_017_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); return _ret; } @@ -186,8 +188,9 @@ bool cppIVRSystem_IVRSystem_017_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); return _ret; } @@ -195,8 +198,9 @@ 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, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_019.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_019.cpp index 73131e95..97ebe4d5 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_019.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_019.cpp @@ -163,8 +163,9 @@ bool cppIVRSystem_IVRSystem_019_PollNextEvent(void *linux_side, winVREvent_t_141 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_1418_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1418_lin_to_win(&lin, pEvent); return _ret; } @@ -172,8 +173,9 @@ bool cppIVRSystem_IVRSystem_019_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_1418_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_1418_lin_to_win(&lin, pEvent); return _ret; } @@ -191,8 +193,9 @@ bool cppIVRSystem_IVRSystem_019_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_1418_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_1418_lin_to_win(&lin, pControllerState); return _ret; } @@ -200,8 +203,9 @@ 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, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VRControllerState001_t_1418_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_1418_lin_to_win(&lin, pControllerState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_020.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_020.cpp index 90ff2127..e29564d3 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_020.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_020.cpp @@ -163,8 +163,9 @@ bool cppIVRSystem_IVRSystem_020_PollNextEvent(void *linux_side, winVREvent_t_161 { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); - struct_VREvent_t_1610_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1610_lin_to_win(&lin, pEvent); return _ret; } @@ -172,8 +173,9 @@ bool cppIVRSystem_IVRSystem_020_PollNextEventWithPose(void *linux_side, ETrackin { VREvent_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); - struct_VREvent_t_1610_lin_to_win(&lin, pEvent); + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pEvent) + struct_VREvent_t_1610_lin_to_win(&lin, pEvent); return _ret; } @@ -191,8 +193,9 @@ bool cppIVRSystem_IVRSystem_020_GetControllerState(void *linux_side, TrackedDevi { VRControllerState001_t lin; bool _ret; - _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, sizeof(lin)); - struct_VRControllerState001_t_1610_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); + if(pControllerState) + struct_VRControllerState001_t_1610_lin_to_win(&lin, pControllerState); return _ret; } @@ -200,8 +203,9 @@ bool cppIVRSystem_IVRSystem_020_GetControllerStateWithPose(void *linux_side, ETr { 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_1610_lin_to_win(&lin, pControllerState); + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + if(pControllerState) + struct_VRControllerState001_t_1610_lin_to_win(&lin, pControllerState); return _ret; }