Reverted changes to misc_util

This commit is contained in:
Jochen Schäfer
2025-04-03 08:08:15 +02:00
parent 666ea1c4e9
commit 40cb3fa5bb
2 changed files with 6 additions and 18 deletions

View File

@@ -26,11 +26,9 @@
/*****************************************************************************/
// C++ SDLnet wrapper
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#define ENET_IMPLEMENTATION
#include "enet.h"
#endif
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#define ENET_IMPLEMENTATION
#include "enet.h"
#endif
#include "ipx.h"
#include "logging.h"
@@ -88,10 +86,8 @@ NETClientSocket *NETClientSocket::NETClientFactory(SocketTypesE socketType,
switch (socketType) {
case SOCKET_TYPE_TCP: return new TCPClientSocket(destination, port);
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
case SOCKET_TYPE_ENET: return new ENETClientSocket(destination, port);
#endif
#endif
default: return nullptr;
@@ -149,10 +145,8 @@ NETServerSocket *NETServerSocket::NETServerFactory(SocketTypesE socketType,
switch (socketType) {
case SOCKET_TYPE_TCP: return new TCPServerSocket(port);
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
case SOCKET_TYPE_ENET: return new ENETServerSocket(port);
#endif
#endif
default: return nullptr;
@@ -162,8 +156,7 @@ NETServerSocket *NETServerSocket::NETServerFactory(SocketTypesE socketType,
// --- ENet UDP NET INTERFACE ------------------------------------------------
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
class enet_manager_t {
public:
enet_manager_t()
@@ -545,7 +538,6 @@ void ENETClientSocket::updateState()
#endif
}
#endif
#endif
// --- TCP NET INTERFACE -----------------------------------------------------

View File

@@ -64,11 +64,9 @@
#include <SDL_net.h>
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#include "enet.h"
#endif
#endif
uint32_t Netwrapper_GetCapabilities();
@@ -133,7 +131,6 @@ public:
// --- ENET UDP NET INTERFACE ------------------------------------------------
#if !defined(OS2)
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
class ENETServerSocket : public NETServerSocket {
public:
@@ -179,7 +176,6 @@ private:
std::queue<uint8_t> receiveBuffer = {};
};
#endif
#endif
// --- TCP NET INTERFACE -----------------------------------------------------