1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 10:23:52 +00:00

[Server] Fix Windows build by not using sigaction on Windows

This commit is contained in:
David Cernat 2020-02-11 19:16:26 +02:00
parent a13cef9913
commit 76f3805e16

View file

@ -500,16 +500,20 @@ int Networking::mainLoop()
{
RakNet::Packet *packet;
#ifndef _WIN32
struct sigaction sigIntHandler;
sigIntHandler.sa_handler = signalHandler;
sigemptyset(&sigIntHandler.sa_mask);
sigIntHandler.sa_flags = 0;
#endif
while (running and !killLoop)
{
#ifndef _WIN32
sigaction(SIGTERM, &sigIntHandler, NULL);
sigaction(SIGINT, &sigIntHandler, NULL);
#endif
if (kbhit() && getch() == '\n')
break;
for (packet=peer->Receive(); packet; peer->DeallocatePacket(packet), packet=peer->Receive())