Files
vicliu b2229138ed Tdeck (#24)
* fix(tracker): apply localized labels on tracker page

* feat: add runtime locale packs and font fallback

* release: prepare 0.1.19-alpha
2026-04-21 03:19:05 +08:00

38 lines
831 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
namespace ui::runtime
{
enum class MemoryProfileKind : uint8_t
{
Constrained = 0,
Standard,
Extended,
};
struct MemoryProfile
{
const char* name = "constrained";
MemoryProfileKind kind = MemoryProfileKind::Constrained;
std::size_t max_locale_font_ram_bytes = 0;
std::size_t max_content_supplement_ram_bytes = 0;
std::size_t max_content_supplement_packs = 0;
std::size_t max_map_decode_tiles = 0;
bool retain_map_decode_cache_on_page_exit = false;
};
const MemoryProfile& current_memory_profile();
inline bool allows_content_supplements()
{
const MemoryProfile& profile = current_memory_profile();
return profile.max_content_supplement_packs > 0 && profile.max_content_supplement_ram_bytes > 0;
}
} // namespace ui::runtime