This commit is contained in:
Arisotura
2023-03-25 00:57:58 +01:00
parent e04cea8e7f
commit cd6e462670

View File

@ -642,7 +642,32 @@ printf("birf\n");
} }
} }
void ProcessMirror() void ProcessMirrorHost()
{
ENetEvent event;
while (enet_host_service(MirrorHost, &event, 0) > 0)
{
switch (event.type)
{
case ENET_EVENT_TYPE_CONNECT:
printf("schmz\n");
break;
case ENET_EVENT_TYPE_DISCONNECT:
{
// TODO
printf("shmtt\n");
}
break;
case ENET_EVENT_TYPE_RECEIVE:
// TODO??
break;
}
}
}
void ProcessMirrorClient()
{ {
ENetEvent event; ENetEvent event;
while (enet_host_service(MirrorHost, &event, 0) > 0) while (enet_host_service(MirrorHost, &event, 0) > 0)
@ -678,9 +703,11 @@ void ProcessFrame()
{ {
if (IsMirror) if (IsMirror)
{ {
ProcessMirror(); ProcessMirrorClient();
} }
else if (IsHost) else
{
if (IsHost)
{ {
ProcessHost(); ProcessHost();
} }
@ -689,6 +716,9 @@ void ProcessFrame()
ProcessClient(); ProcessClient();
} }
ProcessMirrorHost();
}
return; return;
bool block = false; bool block = false;
if (emuThread->emuIsRunning()) if (emuThread->emuIsRunning())