fix for fmt 12 (#3719)

This commit is contained in:
Alexandre Bouvier
2025-10-08 08:49:46 +00:00
committed by GitHub
parent 6805baffb2
commit 999960a6e6
2 changed files with 4 additions and 5 deletions

View File

@@ -118,7 +118,8 @@ void FrameDumpViewer::Draw() {
SameLine();
BeginDisabled(selected_cmd == -1);
if (SmallButton("Dump cmd")) {
auto now_time = fmt::localtime(std::time(nullptr));
auto time = std::time(nullptr);
auto now_time = *std::localtime(&time);
const auto fname = fmt::format("{:%F %H-%M-%S} {}_{}_{}.bin", now_time,
magic_enum::enum_name(selected_queue_type),
selected_submit_num, selected_queue_num2);

View File

@@ -98,10 +98,8 @@ SaveDialogState::SaveDialogState(const OrbisSaveDataDialogParam& param) {
PSF param_sfo;
param_sfo.Open(param_sfo_path);
auto last_write = param_sfo.GetLastWrite();
std::string date_str =
fmt::format("{:%d %b, %Y %R}",
fmt::localtime(std::chrono::system_clock::to_time_t(last_write)));
auto last_write = std::chrono::system_clock::to_time_t(param_sfo.GetLastWrite());
std::string date_str = fmt::format("{:%d %b, %Y %R}", *std::localtime(&last_write));
size_t size = Common::FS::GetDirectorySize(dir_path);
std::string size_str = SpaceSizeToString(size);