mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix build warnings
This commit is contained in:
parent
8755529b1a
commit
6eb17a8e73
@ -490,27 +490,27 @@ static void controlReceiveThreadFunc(void* context) {
|
||||
if (ctlHdr->type == packetTypes[IDX_RUMBLE_DATA]) {
|
||||
BYTE_BUFFER bb;
|
||||
|
||||
BbInitializeWrappedBuffer(&bb, event.packet->data, sizeof(*ctlHdr), event.packet->dataLength - sizeof(*ctlHdr), BYTE_ORDER_LITTLE);
|
||||
BbInitializeWrappedBuffer(&bb, (char*)event.packet->data, sizeof(*ctlHdr), event.packet->dataLength - sizeof(*ctlHdr), BYTE_ORDER_LITTLE);
|
||||
BbAdvanceBuffer(&bb, 4);
|
||||
|
||||
unsigned short controllerNumber;
|
||||
unsigned short lowFreqRumble;
|
||||
unsigned short highFreqRumble;
|
||||
|
||||
BbGetShort(&bb, &controllerNumber);
|
||||
BbGetShort(&bb, &lowFreqRumble);
|
||||
BbGetShort(&bb, &highFreqRumble);
|
||||
BbGetShort(&bb, (short*)&controllerNumber);
|
||||
BbGetShort(&bb, (short*)&lowFreqRumble);
|
||||
BbGetShort(&bb, (short*)&highFreqRumble);
|
||||
|
||||
ListenerCallbacks.rumble(controllerNumber, lowFreqRumble, highFreqRumble);
|
||||
}
|
||||
else if (ctlHdr->type == packetTypes[IDX_TERMINATION]) {
|
||||
BYTE_BUFFER bb;
|
||||
|
||||
BbInitializeWrappedBuffer(&bb, event.packet->data, sizeof(*ctlHdr), event.packet->dataLength - sizeof(*ctlHdr), BYTE_ORDER_LITTLE);
|
||||
BbInitializeWrappedBuffer(&bb, (char*)event.packet->data, sizeof(*ctlHdr), event.packet->dataLength - sizeof(*ctlHdr), BYTE_ORDER_LITTLE);
|
||||
|
||||
unsigned short terminationReason;
|
||||
|
||||
BbGetShort(&bb, &terminationReason);
|
||||
BbGetShort(&bb, (short*)&terminationReason);
|
||||
|
||||
Limelog("Server notified termination reason: 0x%04x\n", terminationReason);
|
||||
|
||||
|
@ -76,3 +76,6 @@ int setNonFatalRecvTimeoutMs(SOCKET s, int timeoutMs);
|
||||
void setRecvTimeout(SOCKET s, int timeoutSec);
|
||||
void closeSocket(SOCKET s);
|
||||
int isPrivateNetworkAddress(struct sockaddr_storage* address);
|
||||
|
||||
int initializePlatformSockets(void);
|
||||
void cleanupPlatformSockets(void);
|
Loading…
x
Reference in New Issue
Block a user