Polish startup, locale pack, and IME UX

This commit is contained in:
liu weikai
2026-04-21 11:51:57 +08:00
parent 063f0960e5
commit 020d881738
16 changed files with 957 additions and 102 deletions
+30 -1
View File
@@ -20,6 +20,35 @@ namespace ui::startup_shell
namespace
{
bool resolve_display_time(struct tm* out_tm)
{
if (!out_tm)
{
return false;
}
if (::platform::ui::time::localtime_now(out_tm))
{
return true;
}
const std::time_t now = std::time(nullptr);
if (now <= 0)
{
return false;
}
const std::time_t local = ::platform::ui::time::apply_timezone_offset(now);
const std::tm* tmp = std::gmtime(&local);
if (!tmp)
{
return false;
}
*out_tm = *tmp;
return true;
}
void present_boot_overlay_now()
{
lv_timer_handler();
@@ -38,7 +67,7 @@ bool format_menu_time(char* out, size_t out_len)
struct tm info
{
};
if (!::platform::ui::time::localtime_now(&info))
if (!resolve_display_time(&info))
{
return false;
}