239 | | // note: %04d -> always 4 digits, so sorting by filename works correctly. |
240 | | const VfsPath basenameFormat(L"screenshots/screenshot%04d"); |
| 239 | wchar_t basenameBuffer[100] = { '\0' }; |
| 240 | time_t seconds; |
| 241 | time(&seconds); |
| 242 | struct tm* current_time = gmtime(&seconds); |
| 243 | const size_t charsWritten = wcsftime(basenameBuffer, ARRAY_SIZE(basenameBuffer), L"screenshots/screenshot_%Y-%m-%d_%H-%M-%S_%%03d", current_time); |
| 244 | ENSURE(charsWritten != 0); |
| 245 | |
| 246 | const VfsPath basenameFormat(basenameBuffer); |