1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Part of #11437: Move GetDateLocal and GetTimeLocal in Platform2.h

This commit is contained in:
frutiemax
2020-06-28 15:46:14 -04:00
committed by GitHub
parent bdbf12892b
commit 5ae592ec79
7 changed files with 38 additions and 59 deletions

View File

@@ -55,28 +55,6 @@
# define swprintf_s(a, b, c, d, ...) swprintf(a, b, c, ##__VA_ARGS__)
# endif
void platform_get_date_local(rct2_date* out_date)
{
assert(out_date != nullptr);
SYSTEMTIME systime;
GetLocalTime(&systime);
out_date->day = systime.wDay;
out_date->month = systime.wMonth;
out_date->year = systime.wYear;
out_date->day_of_week = systime.wDayOfWeek;
}
void platform_get_time_local(rct2_time* out_time)
{
assert(out_time != nullptr);
SYSTEMTIME systime;
GetLocalTime(&systime);
out_time->hour = systime.wHour;
out_time->minute = systime.wMinute;
out_time->second = systime.wSecond;
}
bool platform_file_exists(const utf8* path)
{
auto wPath = String::ToWideChar(path);