mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-07-11 01:34:17 +02:00
FullscreenUI: Use locale time on landing page instead of 24 hour
This commit is contained in:
@@ -1298,9 +1298,11 @@ void FullscreenUI::DrawLandingTemplate(ImVec2* menu_pos, ImVec2* menu_size)
|
||||
#else
|
||||
localtime_r(&utc_time_t, &tm_local);
|
||||
#endif
|
||||
heading_str.format(FSUI_FSTR("{:%H:%M}"), tm_local);
|
||||
char buf[256];
|
||||
std::strftime(buf, sizeof(buf), "%X", &tm_local);
|
||||
heading_str.assign(buf);
|
||||
|
||||
const ImVec2 time_size = heading_font.first->CalcTextSizeA(heading_font.second, FLT_MAX, 0.0f, "00:00");
|
||||
const ImVec2 time_size = heading_font.first->CalcTextSizeA(heading_font.second, FLT_MAX, 0.0f, heading_str.c_str());
|
||||
time_pos = ImVec2(heading_size.x - LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING) - time_size.x,
|
||||
LayoutScale(LAYOUT_MENU_BUTTON_Y_PADDING));
|
||||
ImGuiFullscreen::AddTextWithShadow(
|
||||
|
||||
Reference in New Issue
Block a user