[3PP] Uplifted FMT to 12.1
This commit is contained in:
committed by
Radosław Gliński
parent
56697f1be6
commit
c6be50165f
@@ -1095,7 +1095,8 @@ void EmulatorWindow::ExportScreenshot(const xe::ui::RawImage& image) {
|
|||||||
auto t = std::time(nullptr);
|
auto t = std::time(nullptr);
|
||||||
|
|
||||||
// The format is: Year-Month-DayTHours-Minutes-Seconds based off ISO 8601
|
// The format is: Year-Month-DayTHours-Minutes-Seconds based off ISO 8601
|
||||||
std::string datetime = fmt::format("{:%Y-%m-%dT%H-%M-%S}", fmt::localtime(t));
|
std::string datetime =
|
||||||
|
fmt::format("{:%Y-%m-%dT%H-%M-%S}", *std::localtime(&t));
|
||||||
|
|
||||||
// Get the title id of the game because some titles contain characters that
|
// Get the title id of the game because some titles contain characters that
|
||||||
// cannot be used as a directory
|
// cannot be used as a directory
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ std::string GameAchievementsUI::GetUnlockedTime(
|
|||||||
achievement_entry.unlock_time.to_time_point()));
|
achievement_entry.unlock_time.to_time_point()));
|
||||||
|
|
||||||
return fmt::format("Unlocked: Online {:%Y-%m-%d %H:%M}",
|
return fmt::format("Unlocked: Online {:%Y-%m-%d %H:%M}",
|
||||||
fmt::localtime(unlock_time));
|
*std::localtime(&unlock_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (achievement_entry.unlock_time.is_valid()) {
|
if (achievement_entry.unlock_time.is_valid()) {
|
||||||
@@ -117,7 +117,7 @@ std::string GameAchievementsUI::GetUnlockedTime(
|
|||||||
achievement_entry.unlock_time.to_time_point()));
|
achievement_entry.unlock_time.to_time_point()));
|
||||||
|
|
||||||
return fmt::format("Unlocked: Offline ({:%Y-%m-%d %H:%M})",
|
return fmt::format("Unlocked: Offline ({:%Y-%m-%d %H:%M})",
|
||||||
fmt::localtime(unlock_time));
|
*std::localtime(&unlock_time));
|
||||||
}
|
}
|
||||||
return fmt::format("Unlocked: Offline");
|
return fmt::format("Unlocked: Offline");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,12 +84,13 @@ void TitleListUI::DrawTitleEntry(ImGuiIO& io, TitleInfo& entry) {
|
|||||||
ImGui::GetTextLineHeight());
|
ImGui::GetTextLineHeight());
|
||||||
|
|
||||||
if (entry.WasTitlePlayed()) {
|
if (entry.WasTitlePlayed()) {
|
||||||
ImGui::TextUnformatted(
|
const auto time_date = std::chrono::system_clock::to_time_t(
|
||||||
fmt::format("Last played: {:%Y-%m-%d %H:%M}",
|
std::chrono::system_clock::time_point(
|
||||||
fmt::localtime(std::chrono::system_clock::to_time_t(
|
entry.last_played.time_since_epoch()));
|
||||||
std::chrono::system_clock::time_point(
|
|
||||||
entry.last_played.time_since_epoch()))))
|
ImGui::TextUnformatted(fmt::format("Last played: {:%Y-%m-%d %H:%M}",
|
||||||
.c_str());
|
*std::localtime(&time_date))
|
||||||
|
.c_str());
|
||||||
} else {
|
} else {
|
||||||
ImGui::TextUnformatted("Last played: Unknown");
|
ImGui::TextUnformatted("Last played: Unknown");
|
||||||
}
|
}
|
||||||
|
|||||||
2
third_party/fmt
vendored
2
third_party/fmt
vendored
Submodule third_party/fmt updated: e3ddede6c4...407c905e45
Reference in New Issue
Block a user