Remove junk
This commit is contained in:
parent
632c42f494
commit
81a972020c
5 changed files with 0 additions and 23 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue