mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Fix localtime_s.
This commit is contained in:
parent
392a0e99bf
commit
86331a935d
1 changed files with 8 additions and 3 deletions
|
|
@ -281,9 +281,14 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
struct tm time;
|
#ifdef _WIN32
|
||||||
localtime_s(&time, ×tamp);
|
tm timeStruct;
|
||||||
strftime(buffer, sizeof(buffer), "%Y/%m/%d %H:%M", &time);
|
tm *timePtr = &timeStruct;
|
||||||
|
localtime_s(timePtr, ×tamp);
|
||||||
|
#else
|
||||||
|
tm *timePtr = localtime(×tamp);
|
||||||
|
#endif
|
||||||
|
strftime(buffer, sizeof(buffer), "%Y/%m/%d %H:%M", timePtr);
|
||||||
|
|
||||||
fontSize = Scale(12);
|
fontSize = Scale(12);
|
||||||
textSize = g_fntNewRodinDB->CalcTextSizeA(fontSize, FLT_MAX, 0, buffer);
|
textSize = g_fntNewRodinDB->CalcTextSizeA(fontSize, FLT_MAX, 0, buffer);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue