vrclient: Use manual methods for IVRInput overrides.

CW-Bug-Id: #22729
This commit is contained in:
Rémi Bernon 2023-09-27 08:43:42 +02:00 committed by Arkadiusz Hiler
parent d26ee86dcd
commit d21441d3ef
4 changed files with 69 additions and 49 deletions

View File

@ -261,6 +261,7 @@ MANUAL_METHODS = {
"IVRRenderModels_FreeTextureD3D11": True,
"IVRRenderModels_LoadIntoTextureD3D11_Async": True,
"IVROverlay_SetOverlayTexture": True,
"IVRInput_GetDigitalActionData": lambda ver, abi: ver > 3,
}
@ -348,11 +349,6 @@ def ivroverlay_set_overlay_texture(cppname, method):
"027" in cppname
return "ivroverlay_set_overlay_texture"
def ivrinput_get_digital_action_data(cppname, method):
if "003" in cppname:
return None
return "ivrinput_get_digital_action_data"
method_overrides = [
("IVRClientCore", "BIsHmdPresent", ivrclientcore_is_hmd_present),
("IVRClientCore", "Init", ivrclientcore_init),
@ -364,7 +360,6 @@ method_overrides = [
("IVRCompositor", "WaitGetPoses", ivrcompositor_wait_get_poses),
("IVRCompositor", "GetVulkanDeviceExtensionsRequired", ivrcompositor_get_vulkan_device_extensions_required),
("IVRMailbox", "undoc3", ivrmailbox_undoc3),
("IVRInput", "GetDigitalActionData", ivrinput_get_digital_action_data),
]
method_overrides_data = [

View File

@ -168,11 +168,6 @@ uint32_t ivrcompositor_get_vulkan_device_extensions_required(
void *linux_side, VkPhysicalDevice_T *phys_dev, char *value, uint32_t bufsize,
unsigned int version);
EVRInputError ivrinput_get_digital_action_data(
void *func,
void *linux_side, VRActionHandle_t action_handle, void *action_data, uint32_t action_data_size,
VRInputValueHandle_t restrict_to_device, unsigned int version);
#ifdef __dxvk_interop_h__
extern Texture_t vrclient_translate_texture_dxvk( const Texture_t *texture, struct VRVulkanTextureData_t *vkdata,
IDXGIVkInteropSurface *dxvk_surface, IDXGIVkInteropDevice **p_dxvk_device,

View File

@ -13,6 +13,11 @@
#include "flatapi.h"
#include "struct_converters.h"
#include "cppIVRInput_IVRInput_004.h"
#include "cppIVRInput_IVRInput_005.h"
#include "cppIVRInput_IVRInput_006.h"
#include "cppIVRInput_IVRInput_007.h"
#include "cppIVRInput_IVRInput_010.h"
WINE_DEFAULT_DEBUG_CHANNEL(vrclient);
@ -27,9 +32,9 @@ struct winInputDigitalActionData_t
} __attribute__((ms_struct));
#pragma pack( pop )
EVRInputError ivrinput_get_digital_action_data( void *func, void *linux_side, VRActionHandle_t action_handle,
void *action_data, uint32_t action_data_size,
VRInputValueHandle_t restrict_to_device, unsigned int version )
static EVRInputError ivrinput_get_digital_action_data( void *func, void *linux_side, VRActionHandle_t action_handle,
void *action_data, uint32_t action_data_size,
VRInputValueHandle_t restrict_to_device, unsigned int version )
{
EVRInputError (*cpp_func)( void *, VRActionHandle_t, struct winInputDigitalActionData_t *,
uint32_t, VRInputValueHandle_t ) = func;
@ -102,3 +107,58 @@ EVRInputError ivrinput_get_digital_action_data( void *func, void *linux_side, VR
return 0;
#endif
}
EVRInputError __thiscall winIVRInput_IVRInput_004_GetDigitalActionData( struct w_steam_iface *_this, VRActionHandle_t action,
winInputDigitalActionData_t_1017 *pActionData,
uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice )
{
EVRInputError _ret;
TRACE( "%p\n", _this );
_ret = ivrinput_get_digital_action_data( cppIVRInput_IVRInput_004_GetDigitalActionData, _this->u_iface,
action, pActionData, unActionDataSize, ulRestrictToDevice, 4 );
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_005_GetDigitalActionData( struct w_steam_iface *_this, VRActionHandle_t action,
winInputDigitalActionData_t_1322 *pActionData,
uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice )
{
EVRInputError _ret;
TRACE( "%p\n", _this );
_ret = ivrinput_get_digital_action_data( cppIVRInput_IVRInput_005_GetDigitalActionData, _this->u_iface,
action, pActionData, unActionDataSize, ulRestrictToDevice, 5 );
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_006_GetDigitalActionData( struct w_steam_iface *_this, VRActionHandle_t action,
winInputDigitalActionData_t_1418 *pActionData,
uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice )
{
EVRInputError _ret;
TRACE( "%p\n", _this );
_ret = ivrinput_get_digital_action_data( cppIVRInput_IVRInput_006_GetDigitalActionData, _this->u_iface,
action, pActionData, unActionDataSize, ulRestrictToDevice, 6 );
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_007_GetDigitalActionData( struct w_steam_iface *_this, VRActionHandle_t action,
winInputDigitalActionData_t_1916 *pActionData,
uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice )
{
EVRInputError _ret;
TRACE( "%p\n", _this );
_ret = ivrinput_get_digital_action_data( cppIVRInput_IVRInput_007_GetDigitalActionData, _this->u_iface,
action, pActionData, unActionDataSize, ulRestrictToDevice, 7 );
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_010_GetDigitalActionData( struct w_steam_iface *_this, VRActionHandle_t action,
winInputDigitalActionData_t_1267 *pActionData,
uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice )
{
EVRInputError _ret;
TRACE( "%p\n", _this );
_ret = ivrinput_get_digital_action_data( cppIVRInput_IVRInput_010_GetDigitalActionData, _this->u_iface,
action, pActionData, unActionDataSize, ulRestrictToDevice, 10 );
return _ret;
}

View File

@ -320,13 +320,7 @@ EVRInputError __thiscall winIVRInput_IVRInput_004_UpdateActionState(struct w_ste
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_004_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1017 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
EVRInputError _ret;
TRACE("%p\n", _this);
_ret = ivrinput_get_digital_action_data(cppIVRInput_IVRInput_004_GetDigitalActionData, _this->u_iface, action, pActionData, unActionDataSize, ulRestrictToDevice, 4);
return _ret;
}
extern EVRInputError __thiscall winIVRInput_IVRInput_004_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1017 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError __thiscall winIVRInput_IVRInput_004_GetAnalogActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputAnalogActionData_t_1017 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
@ -579,13 +573,7 @@ EVRInputError __thiscall winIVRInput_IVRInput_005_UpdateActionState(struct w_ste
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_005_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1322 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
EVRInputError _ret;
TRACE("%p\n", _this);
_ret = ivrinput_get_digital_action_data(cppIVRInput_IVRInput_005_GetDigitalActionData, _this->u_iface, action, pActionData, unActionDataSize, ulRestrictToDevice, 5);
return _ret;
}
extern EVRInputError __thiscall winIVRInput_IVRInput_005_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1322 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError __thiscall winIVRInput_IVRInput_005_GetAnalogActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputAnalogActionData_t_1322 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
@ -909,13 +897,7 @@ EVRInputError __thiscall winIVRInput_IVRInput_006_UpdateActionState(struct w_ste
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_006_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1418 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
EVRInputError _ret;
TRACE("%p\n", _this);
_ret = ivrinput_get_digital_action_data(cppIVRInput_IVRInput_006_GetDigitalActionData, _this->u_iface, action, pActionData, unActionDataSize, ulRestrictToDevice, 6);
return _ret;
}
extern EVRInputError __thiscall winIVRInput_IVRInput_006_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1418 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError __thiscall winIVRInput_IVRInput_006_GetAnalogActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputAnalogActionData_t_1418 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
@ -1251,13 +1233,7 @@ EVRInputError __thiscall winIVRInput_IVRInput_007_UpdateActionState(struct w_ste
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1916 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
EVRInputError _ret;
TRACE("%p\n", _this);
_ret = ivrinput_get_digital_action_data(cppIVRInput_IVRInput_007_GetDigitalActionData, _this->u_iface, action, pActionData, unActionDataSize, ulRestrictToDevice, 7);
return _ret;
}
extern EVRInputError __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1916 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError __thiscall winIVRInput_IVRInput_007_GetAnalogActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputAnalogActionData_t_1916 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
@ -1617,13 +1593,7 @@ EVRInputError __thiscall winIVRInput_IVRInput_010_UpdateActionState(struct w_ste
return _ret;
}
EVRInputError __thiscall winIVRInput_IVRInput_010_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1267 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{
EVRInputError _ret;
TRACE("%p\n", _this);
_ret = ivrinput_get_digital_action_data(cppIVRInput_IVRInput_010_GetDigitalActionData, _this->u_iface, action, pActionData, unActionDataSize, ulRestrictToDevice, 10);
return _ret;
}
extern EVRInputError __thiscall winIVRInput_IVRInput_010_GetDigitalActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputDigitalActionData_t_1267 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice);
EVRInputError __thiscall winIVRInput_IVRInput_010_GetAnalogActionData(struct w_steam_iface *_this, VRActionHandle_t action, winInputAnalogActionData_t_1267 *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice)
{