fix compilation error caused by conflicting names

This commit is contained in:
beerpsi 2023-12-31 14:41:41 +07:00
parent 59ce0565e5
commit 255eb07d31
4 changed files with 6 additions and 6 deletions

View File

@ -270,9 +270,9 @@ unsigned int __stdcall input_recv_thread_proc(void *v) {
}
}
if (packet_len >= sizeof(struct PacketInput) &&
if (packet_len >= sizeof(struct AndroidPacketInput) &&
memcmp(buffer + 1, "INP", 3) == 0) {
const struct PacketInput *pkt = (struct PacketInput *)buffer;
const struct AndroidPacketInput *pkt = (struct AndroidPacketInput *)buffer;
memcpy(memory->airIoStatus, pkt->airIoStatus, sizeof(pkt->airIoStatus));
memcpy(memory->sliderIoStatus, pkt->sliderIoStatus,

View File

@ -13,7 +13,7 @@
;
#pragma pack(push)
#pragma pack(1)
struct PacketInput {
struct AndroidPacketInput {
uint8_t packetSize;
uint8_t packetName[3];
uint32_t packetId;

View File

@ -102,8 +102,8 @@ unsigned int __stdcall ios_input_recv_thread_proc(void *v) {
break;
}
if (len >= sizeof(struct PacketInput) && memcmp(buffer + 1, "INP", 3) == 0) {
struct PacketInput *pkt = (struct PacketInput *)buffer;
if (len >= sizeof(struct iOSPacketInput) && memcmp(buffer + 1, "INP", 3) == 0) {
struct iOSPacketInput *pkt = (struct iOSPacketInput *)buffer;
if (air_enabled) {
memcpy(ctx->memory->airIoStatus, pkt->airIoStatus,

View File

@ -13,7 +13,7 @@
;
#pragma pack(push)
#pragma pack(1)
struct PacketInput {
struct iOSPacketInput {
uint8_t packetSize;
uint8_t packetName[3];
uint8_t airIoStatus[6];