mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Close #11437: Migrate old platform methods
This commit is contained in:
committed by
GitHub
parent
b424682934
commit
5edc561715
@@ -17,7 +17,7 @@
|
||||
#include "../localisation/Formatting.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../network/network.h"
|
||||
#include "../platform/platform.h"
|
||||
#include "../platform/Platform.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Location.hpp"
|
||||
|
||||
@@ -164,7 +164,7 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor)
|
||||
for (int32_t i = 0; i < CHAT_HISTORY_SIZE; i++, screenCoords.y -= stringHeight)
|
||||
{
|
||||
uint32_t expireTime = chat_history_get_time(i) + 10000;
|
||||
if (!gChatOpen && platform_get_ticks() > expireTime)
|
||||
if (!gChatOpen && Platform::GetTicks() > expireTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ void chat_history_add(std::string_view s)
|
||||
int32_t index = _chatHistoryIndex % CHAT_HISTORY_SIZE;
|
||||
std::fill_n(_chatHistory[index], CHAT_INPUT_SIZE, 0x00);
|
||||
std::memcpy(_chatHistory[index], buffer.c_str(), std::min<size_t>(buffer.size(), CHAT_INPUT_SIZE - 1));
|
||||
_chatHistoryTime[index] = platform_get_ticks();
|
||||
_chatHistoryTime[index] = Platform::GetTicks();
|
||||
_chatHistoryIndex++;
|
||||
|
||||
// Log to file (src only as logging does its own timestamp)
|
||||
|
||||
Reference in New Issue
Block a user