1
0
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:
Ted John
2017-03-26 22:30:23 +01:00
parent f8cb551721
commit 73fb132e41
16 changed files with 60 additions and 45 deletions

View File

@@ -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;
}