mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:45:32 +00:00
Revert "Merge branch '0.7.1-window-input' into 0.7.1"
This reverts commit94f5b169e6
, reversing changes made to43e7df6df8
. # Conflicts: # apps/openmw-mp/handleInput.cpp
This commit is contained in:
parent
d7044db179
commit
15fdac3f6c
2 changed files with 7 additions and 23 deletions
|
@ -25,8 +25,6 @@
|
|||
#include "processors/ObjectProcessor.hpp"
|
||||
#include "processors/WorldstateProcessor.hpp"
|
||||
|
||||
#include "handleInput.cpp"
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
Networking *Networking::sThis = 0;
|
||||
|
@ -497,20 +495,6 @@ void signalHandler(int signum)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
BOOL WINAPI sigIntHandler(_In_ DWORD dwCtrlType) {
|
||||
switch (dwCtrlType)
|
||||
{
|
||||
case CTRL_C_EVENT:
|
||||
signalHandler(15);
|
||||
return TRUE;
|
||||
default:
|
||||
// Pass signal on to the next handler
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int Networking::mainLoop()
|
||||
{
|
||||
RakNet::Packet *packet;
|
||||
|
@ -521,15 +505,16 @@ int Networking::mainLoop()
|
|||
sigIntHandler.sa_handler = signalHandler;
|
||||
sigemptyset(&sigIntHandler.sa_mask);
|
||||
sigIntHandler.sa_flags = 0;
|
||||
sigaction(SIGTERM, &sigIntHandler, NULL);
|
||||
sigaction(SIGINT, &sigIntHandler, NULL);
|
||||
#else
|
||||
SetConsoleCtrlHandler(sigIntHandler, TRUE);
|
||||
#endif
|
||||
|
||||
while (running and !killLoop)
|
||||
{
|
||||
mwmp_input::handler();
|
||||
#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())
|
||||
{
|
||||
if (getMasterClient()->Process(packet))
|
||||
|
|
|
@ -220,8 +220,7 @@ public:
|
|||
{"OnClientScriptLocal", Callback<unsigned short, const char*>()},
|
||||
{"OnClientScriptGlobal", Callback<unsigned short>()},
|
||||
{"OnMpNumIncrement", Callback<int>()},
|
||||
{"OnRequestDataFileList", Callback<>()},
|
||||
{"OnServerWindowInput", Callback<const char *>()}
|
||||
{"OnRequestDataFileList", Callback<>()}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue