mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #10169 from leoetlino/fmt-localtime
Use fmt::localtime instead of thread-unsafe std::localtime
This commit is contained in:
@ -748,7 +748,7 @@ static std::string GenerateScreenshotName()
|
||||
|
||||
const std::time_t cur_time = std::time(nullptr);
|
||||
const std::string base_name =
|
||||
fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, *std::localtime(&cur_time));
|
||||
fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, fmt::localtime(cur_time));
|
||||
|
||||
// First try a filename without any suffixes, if already exists then append increasing numbers
|
||||
std::string name = fmt::format("{}.png", base_name);
|
||||
|
Reference in New Issue
Block a user