diff --git a/3DS/include/wireless.h b/3DS/include/wireless.h index b3b6129..2d50893 100644 --- a/3DS/include/wireless.h +++ b/3DS/include/wireless.h @@ -37,7 +37,6 @@ struct packet { extern int sock; extern struct sockaddr_in sain, saout; -//extern char outBuf[sizeof(struct packet)], rcvBuf[sizeof(struct packet)]; extern struct packet outBuf, rcvBuf; bool openSocket(int port); diff --git a/3DS/source/wireless.c b/3DS/source/wireless.c index ee6aec6..ad93d1b 100644 --- a/3DS/source/wireless.c +++ b/3DS/source/wireless.c @@ -2,7 +2,6 @@ int sock; struct sockaddr_in sain, saout; -//char outBuf[sizeof(struct packet)], rcvBuf[sizeof(struct packet)]; struct packet outBuf, rcvBuf; bool openSocket(int port) { @@ -29,20 +28,8 @@ void sendConnectionRequest(void) { } void sendKeys(unsigned int keys, circlePosition circlePad, touchPosition touch) { - //outBuf[0] = KEYS; outBuf.command = KEYS; - //memcpy(outBuf + 1, &keys, 4); - //memcpy(outBuf + 5, &cstick, 4); - - //#pragma GCC diagnostic push - //#pragma GCC diagnostic ignored "-Wstrict-aliasing" - //memcpy(&((struct packet *)outBuf)->keys, &keys, 4); - //memcpy(&((struct packet *)outBuf)->cstick, &cstick, 4); - //memcpy(&((struct packet *)outBuf)->touch, &touch, 4); - //sendBuf(sizeof(struct packet)); - //#pragma GCC diagnostic pop - memcpy(&outBuf.keys, &keys, 4); memcpy(&outBuf.circlePad, &circlePad, 4); memcpy(&outBuf.touch, &touch, 4); diff --git a/PC/include/wireless.h b/PC/include/wireless.h index 881c327..1c58c0d 100644 --- a/PC/include/wireless.h +++ b/PC/include/wireless.h @@ -38,7 +38,6 @@ extern struct sockaddr_in client_in; extern int sockaddr_in_sizePtr; -//extern char buffer[sizeof(struct packet)]; extern struct packet buffer; extern char hostName[80]; diff --git a/PC/source/main.c b/PC/source/main.c index 7c4da5f..089fb79 100644 --- a/PC/source/main.c +++ b/PC/source/main.c @@ -88,17 +88,10 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nShow) lastKeys = currentKeys; if(currentKeys & KEY_TOUCH) lastTouch = currentTouch; - //#pragma GCC diagnostic push - //#pragma GCC diagnostic ignored "-Wstrict-aliasing" - //memcpy(¤tKeys, &((struct packet *)buffer)->keys, 4); - //memcpy(&circlePad, &((struct packet *)buffer)->circlePad, 4); - //memcpy(¤tTouch, &((struct packet *)buffer)->touch, 4); - //#pragma GCC diagnostic pop memcpy(¤tKeys, &buffer.keys, 4); memcpy(&circlePad, &buffer.circlePad, 4); memcpy(¤tTouch, &buffer.touch, 4); - handleKey(KEY_A, settings.A); handleKey(KEY_B, settings.B); handleKey(KEY_SELECT, settings.Select); diff --git a/PC/source/wireless.c b/PC/source/wireless.c index 5b72572..33ead36 100644 --- a/PC/source/wireless.c +++ b/PC/source/wireless.c @@ -9,7 +9,6 @@ struct sockaddr_in client_in; int sockaddr_in_sizePtr = (int)sizeof(struct sockaddr_in); -//char buffer[sizeof(struct packet)]; struct packet buffer; char hostName[80];