diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2025-06-04 13:12:50 +0200 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2025-06-04 13:32:12 +0200 |
| commit | 4b65cc9a4c51af4308f748b3e7bf25d80db83860 (patch) | |
| tree | 7b9ee319df7091ab78810add0b573f69d2b9ac29 /Source/Core/AudioCommon/AudioCommon.cpp | |
| parent | 1c9389a1fbfb24e6ea9370c3aa36c61ca528d792 (diff) | |
fmt: Replace deprecated `fmt::localtime` usage with `Common::LocalTime`
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/AudioCommon.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index de046a9aab..1258e0fd7e 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -16,6 +16,7 @@ #include "AudioCommon/WASAPIStream.h" #include "Common/FileUtil.h" #include "Common/Logging/Log.h" +#include "Common/TimeUtil.h" #include "Core/Config/MainSettings.h" #include "Core/ConfigManager.h" #include "Core/System.h" @@ -218,8 +219,11 @@ void StartAudioDump(Core::System& system) std::string path_prefix = File::GetUserPath(D_DUMPAUDIO_IDX) + SConfig::GetInstance().GetGameID(); - std::string base_name = - fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, fmt::localtime(start_time)); + const auto local_time = Common::LocalTime(start_time); + if (!local_time) + return; + + std::string base_name = fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, *local_time); const std::string audio_file_name_dtk = fmt::format("{}_dtkdump.wav", base_name); const std::string audio_file_name_dsp = fmt::format("{}_dspdump.wav", base_name); |
