aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorWaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com>2021-02-23 18:15:02 +0000
committerWaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com>2021-02-23 18:15:02 +0000
commit68da2ace589e7a5d013c7287d9a2a96d83cc00ec (patch)
tree7e08acae2d88abf4d49874e8ae92296cd4d193e3 /src/frontend
parent94dcc9523eb1dfac0141d76eb148184b8c911781 (diff)
Include winsock2.h before windows.h
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qt_sdl/Platform.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp
index fea4f0a..32a4898 100644
--- a/src/frontend/qt_sdl/Platform.cpp
+++ b/src/frontend/qt_sdl/Platform.cpp
@@ -19,6 +19,29 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef __WIN32__
+ #define NTDDI_VERSION 0x06000000 // GROSS FUCKING HACK
+ #include <winsock2.h>
+ #include <windows.h>
+ //#include <knownfolders.h> // FUCK THAT SHIT
+ #include <shlobj.h>
+ #include <ws2tcpip.h>
+ #include <io.h>
+ #define dup _dup
+ #define socket_t SOCKET
+ #define sockaddr_t SOCKADDR
+#else
+ #include <unistd.h>
+ #include <netinet/in.h>
+ #include <sys/select.h>
+ #include <sys/socket.h>
+
+ #define socket_t int
+ #define sockaddr_t struct sockaddr
+ #define closesocket close
+#endif
+
#include <QStandardPaths>
#include <QDir>
#include <QThread>
@@ -32,31 +55,8 @@
#include "LAN_PCap.h"
#include <string>
-#ifdef __WIN32__
-#define NTDDI_VERSION 0x06000000 // GROSS FUCKING HACK
-#include <windows.h>
-//#include <knownfolders.h> // FUCK THAT SHIT
-#include <shlobj.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <io.h>
-#define dup _dup
-#define socket_t SOCKET
-#define sockaddr_t SOCKADDR
-#else
-
-#include <unistd.h>
-#include <netinet/in.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-
-#define socket_t int
-#define sockaddr_t struct sockaddr
-#define closesocket close
-#endif
-
#ifndef INVALID_SOCKET
-#define INVALID_SOCKET (socket_t)-1
+ #define INVALID_SOCKET (socket_t)-1
#endif