From 1712f10f66128c28394dca371a27c6545a002cdf Mon Sep 17 00:00:00 2001 From: Will Xyen Date: Sat, 12 Sep 2020 07:53:00 -0700 Subject: [PATCH] minor bugfixes --- src/main/acio/acio.h | 1 + src/main/aciodrv/device.c | 1 + src/main/bio2drv/detect.c | 2 +- src/main/dinput/dinput.c | 8 +++++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/acio/acio.h b/src/main/acio/acio.h index 34579f0..effea99 100644 --- a/src/main/acio/acio.h +++ b/src/main/acio/acio.h @@ -36,6 +36,7 @@ enum ac_io_node_type { AC_IO_NODE_TYPE_LED_SPIKE = 0x05010000, AC_IO_NODE_TYPE_KFCA = 0x09060000, AC_IO_NODE_TYPE_BI2A = 0x0d060000, + AC_IO_NODE_TYPE_RVOL = 0x09060001, }; #pragma pack(push, 1) diff --git a/src/main/aciodrv/device.c b/src/main/aciodrv/device.c index 0cdf1f2..b0ec7de 100644 --- a/src/main/aciodrv/device.c +++ b/src/main/aciodrv/device.c @@ -166,6 +166,7 @@ static int aciodrv_device_receive(uint8_t *buffer, int size) #ifdef AC_IO_MSG_LOG aciodrv_device_log_buffer("Recv (1)", recv_buf, recv_size); + log_warning("Expected %d got %d", recv_buf[4], recv_size - 6); #endif /* recv_size - 1: omit checksum for checksum calc */ diff --git a/src/main/bio2drv/detect.c b/src/main/bio2drv/detect.c index be9ad04..fa52a33 100644 --- a/src/main/bio2drv/detect.c +++ b/src/main/bio2drv/detect.c @@ -99,7 +99,7 @@ static bool get_device_by_filter( if (DeviceRegKey) { bool found = false; - log_info("Found a serial device at index: %d", idx); + log_info("Found a serial device at index: %ld", idx); if (!id_filter) { if (check_property(DeviceInfoSet, &DeviceInfoData, property)) { diff --git a/src/main/dinput/dinput.c b/src/main/dinput/dinput.c index e9d1fcd..f62d547 100644 --- a/src/main/dinput/dinput.c +++ b/src/main/dinput/dinput.c @@ -95,7 +95,13 @@ static HRESULT STDCALL my_DirectInput8Create( return res; } - api_proxy = com_proxy_wrap(api, sizeof(*api->lpVtbl)); + res = com_proxy_wrap(&api_proxy, api, sizeof(*api->lpVtbl)); + + if (res != S_OK) { + log_warning("Wrapping com proxy failed: %08lx", res); + return res; + } + api_vtbl = api_proxy->vptr; api_vtbl->EnumDevices = my_EnumDevices;