Use explicit layout timestamp probe

This commit is contained in:
2026-06-12 16:59:20 +02:00
parent a6b01c2d12
commit 48a795822a
3 changed files with 16 additions and 3 deletions

View File

@@ -24,10 +24,15 @@ void LayoutManager::create()
bool LayoutManager::load(const char* path)
{
auto abs_path = Asset::absolute(path);
const auto file_load = pp::platform::plan_asset_file_load(
abs_path,
const auto platform_family = pp::platform::current_platform_family();
const auto file_probe = pp::platform::platform_uses_asset_file_mtime_reload(platform_family)
? pp::platform::probe_asset_file_timestamp(abs_path)
: pp::platform::AssetFileTimestampProbe {};
const auto file_load = pp::platform::plan_asset_file_load_with_probe(
platform_family,
m_loaded,
m_file_last_write_time);
m_file_last_write_time,
file_probe);
if (!file_load.should_read_file)
return file_load.skipped_load_result;
m_file_last_write_time = file_load.last_write_time;