From 4b65cc9a4c51af4308f748b3e7bf25d80db83860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 4 Jun 2025 13:12:50 +0200 Subject: fmt: Replace deprecated `fmt::localtime` usage with `Common::LocalTime` --- Source/Core/VideoCommon/FrameDumpFFMpeg.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/FrameDumpFFMpeg.cpp') diff --git a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp index 44ec0a6a27..e0e61529f7 100644 --- a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp +++ b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "VideoCommon/FrameDumpFFMpeg.h" +#include "Common/TimeUtil.h" #if defined(__FreeBSD__) #define __STDC_CONSTANT_MACROS 1 @@ -124,11 +125,15 @@ std::string GetDumpPath(const std::string& extension, std::time_t time, u32 inde if (!dump_path.empty()) return dump_path; + const auto local_time = Common::LocalTime(time); + if (!local_time) + return ""; + const std::string path_prefix = File::GetUserPath(D_DUMPFRAMES_IDX) + SConfig::GetInstance().GetGameID(); const std::string base_name = - fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}_{}", path_prefix, fmt::localtime(time), index); + fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}_{}", path_prefix, *local_time, index); const std::string path = fmt::format("{}.{}", base_name, extension); -- cgit v1.2.3