mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01: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;
|
||||
|
||||
char buffer[32];
|
||||
struct tm time;
|
||||
localtime_s(&time, ×tamp);
|
||||
strftime(buffer, sizeof(buffer), "%Y/%m/%d %H:%M", &time);
|
||||
#ifdef _WIN32
|
||||
tm timeStruct;
|
||||
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);
|
||||
textSize = g_fntNewRodinDB->CalcTextSizeA(fontSize, FLT_MAX, 0, buffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue