summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
diff options
context:
space:
mode:
authorJoshua Vandaƫle <joshua@vandaele.software>2025-06-04 13:12:50 +0200
committerJoshua Vandaƫle <joshua@vandaele.software>2025-06-04 13:32:12 +0200
commit4b65cc9a4c51af4308f748b3e7bf25d80db83860 (patch)
tree7b9ee319df7091ab78810add0b573f69d2b9ac29 /Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
parent1c9389a1fbfb24e6ea9370c3aa36c61ca528d792 (diff)
fmt: Replace deprecated `fmt::localtime` usage with `Common::LocalTime`
Diffstat (limited to 'Source/Core/VideoCommon/FrameDumpFFMpeg.cpp')
-rw-r--r--Source/Core/VideoCommon/FrameDumpFFMpeg.cpp7
1 files changed, 6 insertions, 1 deletions
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);