mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
Replace some SDL functions with our own
This commit is contained in:
@@ -85,7 +85,7 @@ sint32 NetworkConnection::ReadPacket()
|
||||
}
|
||||
if (InboundPacket.BytesTransferred == sizeof(InboundPacket.Size) + InboundPacket.Size)
|
||||
{
|
||||
_lastPacketTime = SDL_GetTicks();
|
||||
_lastPacketTime = platform_get_ticks();
|
||||
return NETWORK_READPACKET_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -150,13 +150,13 @@ void NetworkConnection::SendQueuedPackets()
|
||||
|
||||
void NetworkConnection::ResetLastPacketTime()
|
||||
{
|
||||
_lastPacketTime = SDL_GetTicks();
|
||||
_lastPacketTime = platform_get_ticks();
|
||||
}
|
||||
|
||||
bool NetworkConnection::ReceivedPacketRecently()
|
||||
{
|
||||
#ifndef DEBUG
|
||||
if (SDL_TICKS_PASSED(SDL_GetTicks(), _lastPacketTime + 7000))
|
||||
if (platform_get_ticks() > _lastPacketTime + 7000)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user