pyiforce/pyvjoy_ffb.py

16 lines
339 B
Python
Raw Normal View History

2020-10-30 02:00:14 +01:00
from ctypes import CFUNCTYPE, c_void_p
# void CALLBACK FfbFunction1(PVOID FfbPacket, PVOID userdata)
PYVJOY_CB_FUNC = CFUNCTYPE(None, c_void_p, c_void_p)
def pyvjoy_ffb_default_cb(ffb_pkt, userdata):
print(' '.join('%02x' % x for x in ffb_pkt))
# typedef struct _FFB_DATA {
# ULONG size;
# ULONG cmd;
# UCHAR *data;
# } FFB_DATA;