mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-26 14:45:48 +03:00
vrclient: Revert "vrclient: HACK: Fixup digital action 'bChange' parameter on 32 bit."
By removing manual handling of IVRInput::GetDigitalActionData(). CW-Bug-Id: #19067 CW-Bug-Id: #24440
This commit is contained in:
parent
75831c0797
commit
a50dbef090
@ -11,7 +11,6 @@ SOURCES = \
|
||||
vrclient_generated.c \
|
||||
vrclient_main.c \
|
||||
vrcompositor_manual.c \
|
||||
vrinput_manual.c \
|
||||
vroverlay_manual.c \
|
||||
vrsystem_manual.c \
|
||||
vrrendermodels_manual.c \
|
||||
|
@ -251,7 +251,6 @@ MANUAL_METHODS = {
|
||||
"IVRRenderModels_FreeRenderModel": lambda ver, abi: ver > 1,
|
||||
"IVRMailbox_undoc3": lambda ver, abi: abi == 'u',
|
||||
"IVROverlay_SetOverlayTexture": True,
|
||||
"IVRInput_GetDigitalActionData": lambda ver, abi: abi == 'w' and ver > 3,
|
||||
"IVRTrackedCamera_GetVideoStreamFrame": True,
|
||||
}
|
||||
|
||||
|
@ -1,206 +0,0 @@
|
||||
#include "vrclient_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(vrclient);
|
||||
|
||||
#ifndef __x86_64__
|
||||
static uint32_t ivrinput_get_digital_action_data( uint64_t action_handle, void *action_data, uint32_t action_data_size,
|
||||
uint64_t restrict_to_device, unsigned int version )
|
||||
{
|
||||
/* Digital action state change fixup hack. */
|
||||
w_InputDigitalActionData_t *data = action_data;
|
||||
LARGE_INTEGER qpf;
|
||||
unsigned int i;
|
||||
|
||||
TRACE( "handle %s, data %p, data_size %u, restrict %s, origin %s, state %#x, changed %#x, active %#x.\n",
|
||||
wine_dbgstr_longlong( action_handle ), action_data, action_data_size,
|
||||
wine_dbgstr_longlong( restrict_to_device ), wine_dbgstr_longlong( data->activeOrigin ),
|
||||
data->bState, data->bChanged, data->bActive );
|
||||
|
||||
if (action_data_size != sizeof(*data))
|
||||
{
|
||||
WARN( "Unexpected action_data_size %u.\n", action_data_size );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!data->bActive) return 0;
|
||||
|
||||
if (!compositor_data.qpf_freq.QuadPart) QueryPerformanceFrequency( &compositor_data.qpf_freq );
|
||||
QueryPerformanceCounter( &qpf );
|
||||
|
||||
for (i = 0; i < compositor_data.digital_action_count; ++i)
|
||||
{
|
||||
if (compositor_data.digital_actions_state[i].action == action_handle &&
|
||||
compositor_data.digital_actions_state[i].origin == data->activeOrigin)
|
||||
{
|
||||
if ((data->bChanged = (!compositor_data.digital_actions_state[i].previous_state != !data->bState)))
|
||||
{
|
||||
TRACE( "action %s (%s) changed to %#x, data->fUpdateTime %f.\n",
|
||||
wine_dbgstr_longlong( action_handle ),
|
||||
wine_dbgstr_longlong( restrict_to_device ), data->bState, data->fUpdateTime );
|
||||
|
||||
compositor_data.digital_actions_state[i].update_qpf_time = qpf;
|
||||
compositor_data.digital_actions_state[i].previous_state = data->bState;
|
||||
}
|
||||
if (compositor_data.digital_actions_state[i].update_qpf_time.QuadPart)
|
||||
data->fUpdateTime = -(float)(qpf.QuadPart - compositor_data.digital_actions_state[i].update_qpf_time.QuadPart) / compositor_data.qpf_freq.QuadPart;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == ARRAY_SIZE(compositor_data.digital_actions_state))
|
||||
{
|
||||
static unsigned int once;
|
||||
if (!once++) WARN( "Too many actions.\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
compositor_data.digital_actions_state[i].action = action_handle;
|
||||
compositor_data.digital_actions_state[i].origin = data->activeOrigin;
|
||||
compositor_data.digital_actions_state[i].previous_state = data->bState;
|
||||
compositor_data.digital_actions_state[i].update_qpf_time = qpf;
|
||||
++compositor_data.digital_action_count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_004_GetDigitalActionData( struct w_steam_iface *_this, uint64_t action,
|
||||
w_InputDigitalActionData_t *pActionData,
|
||||
uint32_t unActionDataSize, uint64_t ulRestrictToDevice )
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_004_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
|
||||
TRACE( "%p\n", _this );
|
||||
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_004_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
#ifdef __x86_64__
|
||||
return params._ret;
|
||||
#else
|
||||
if (params._ret) return params._ret;
|
||||
return ivrinput_get_digital_action_data( action, pActionData, unActionDataSize, ulRestrictToDevice, 4 );
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_005_GetDigitalActionData( struct w_steam_iface *_this, uint64_t action,
|
||||
w_InputDigitalActionData_t *pActionData,
|
||||
uint32_t unActionDataSize, uint64_t ulRestrictToDevice )
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_005_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
|
||||
TRACE( "%p\n", _this );
|
||||
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_005_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
#ifdef __x86_64__
|
||||
return params._ret;
|
||||
#else
|
||||
if (params._ret) return params._ret;
|
||||
return ivrinput_get_digital_action_data( action, pActionData, unActionDataSize, ulRestrictToDevice, 5 );
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_006_GetDigitalActionData( struct w_steam_iface *_this, uint64_t action,
|
||||
w_InputDigitalActionData_t *pActionData,
|
||||
uint32_t unActionDataSize, uint64_t ulRestrictToDevice )
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_006_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
|
||||
TRACE( "%p\n", _this );
|
||||
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_006_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
#ifdef __x86_64__
|
||||
return params._ret;
|
||||
#else
|
||||
if (params._ret) return params._ret;
|
||||
return ivrinput_get_digital_action_data( action, pActionData, unActionDataSize, ulRestrictToDevice, 6 );
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_007_GetDigitalActionData( struct w_steam_iface *_this, uint64_t action,
|
||||
w_InputDigitalActionData_t *pActionData,
|
||||
uint32_t unActionDataSize, uint64_t ulRestrictToDevice )
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_007_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
|
||||
TRACE( "%p\n", _this );
|
||||
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_007_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
#ifdef __x86_64__
|
||||
return params._ret;
|
||||
#else
|
||||
if (params._ret) return params._ret;
|
||||
return ivrinput_get_digital_action_data( action, pActionData, unActionDataSize, ulRestrictToDevice, 7 );
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_010_GetDigitalActionData( struct w_steam_iface *_this, uint64_t action,
|
||||
w_InputDigitalActionData_t *pActionData,
|
||||
uint32_t unActionDataSize, uint64_t ulRestrictToDevice )
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_010_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
|
||||
TRACE( "%p\n", _this );
|
||||
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_010_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
#ifdef __x86_64__
|
||||
return params._ret;
|
||||
#else
|
||||
if (params._ret) return params._ret;
|
||||
return ivrinput_get_digital_action_data( action, pActionData, unActionDataSize, ulRestrictToDevice, 10 );
|
||||
#endif
|
||||
}
|
@ -454,7 +454,24 @@ uint32_t __thiscall winIVRInput_IVRInput_004_UpdateActionState(struct w_steam_if
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
extern uint32_t __thiscall winIVRInput_IVRInput_004_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice);
|
||||
uint32_t __thiscall winIVRInput_IVRInput_004_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_004_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
TRACE("%p\n", _this);
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_004_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_004_GetAnalogActionData(struct w_steam_iface *_this, uint64_t action, w_InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
@ -832,7 +849,24 @@ uint32_t __thiscall winIVRInput_IVRInput_005_UpdateActionState(struct w_steam_if
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
extern uint32_t __thiscall winIVRInput_IVRInput_005_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice);
|
||||
uint32_t __thiscall winIVRInput_IVRInput_005_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_005_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
TRACE("%p\n", _this);
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_005_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_005_GetAnalogActionData(struct w_steam_iface *_this, uint64_t action, w_InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
@ -1317,7 +1351,24 @@ uint32_t __thiscall winIVRInput_IVRInput_006_UpdateActionState(struct w_steam_if
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
extern uint32_t __thiscall winIVRInput_IVRInput_006_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice);
|
||||
uint32_t __thiscall winIVRInput_IVRInput_006_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_006_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
TRACE("%p\n", _this);
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_006_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_006_GetAnalogActionData(struct w_steam_iface *_this, uint64_t action, w_InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
@ -1827,7 +1878,24 @@ uint32_t __thiscall winIVRInput_IVRInput_007_UpdateActionState(struct w_steam_if
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
extern uint32_t __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice);
|
||||
uint32_t __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_007_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
TRACE("%p\n", _this);
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_007_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_007_GetAnalogActionData(struct w_steam_iface *_this, uint64_t action, w_InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
@ -2376,7 +2444,24 @@ uint32_t __thiscall winIVRInput_IVRInput_010_UpdateActionState(struct w_steam_if
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
extern uint32_t __thiscall winIVRInput_IVRInput_010_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice);
|
||||
uint32_t __thiscall winIVRInput_IVRInput_010_GetDigitalActionData(struct w_steam_iface *_this, uint64_t action, w_InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
w_InputDigitalActionData_t w_pActionData;
|
||||
struct IVRInput_IVRInput_010_GetDigitalActionData_params params =
|
||||
{
|
||||
.linux_side = _this->u_iface,
|
||||
.action = action,
|
||||
.pActionData = pActionData ? &w_pActionData : NULL,
|
||||
.unActionDataSize = unActionDataSize,
|
||||
.ulRestrictToDevice = ulRestrictToDevice,
|
||||
};
|
||||
TRACE("%p\n", _this);
|
||||
unActionDataSize = min( unActionDataSize, sizeof(w_pActionData) );
|
||||
if (pActionData) memcpy( &w_pActionData, pActionData, unActionDataSize );
|
||||
VRCLIENT_CALL( IVRInput_IVRInput_010_GetDigitalActionData, ¶ms );
|
||||
if (pActionData) memcpy( pActionData, &w_pActionData, unActionDataSize );
|
||||
return params._ret;
|
||||
}
|
||||
|
||||
uint32_t __thiscall winIVRInput_IVRInput_010_GetAnalogActionData(struct w_steam_iface *_this, uint64_t action, w_InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, uint64_t ulRestrictToDevice)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user