Split asset reload platform policy

This commit is contained in:
2026-06-05 11:44:28 +02:00
parent c4d00258ff
commit 0236fc6620
8 changed files with 168 additions and 31 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include "platform_api/platform_policy.h"
#include <cstdint>
#include <string_view>
@@ -11,6 +13,23 @@ struct AssetFileLoadDecision {
std::int64_t last_write_time = 0;
};
struct AssetFileTimestampProbe {
bool file_exists = false;
std::int64_t last_write_time = 0;
};
[[nodiscard]] AssetFileLoadDecision plan_asset_file_load_with_probe(
PlatformFamily family,
bool already_loaded,
std::int64_t previous_last_write_time,
AssetFileTimestampProbe probe) noexcept;
[[nodiscard]] AssetFileLoadDecision plan_asset_file_load_for_platform(
PlatformFamily family,
std::string_view absolute_path,
bool already_loaded,
std::int64_t previous_last_write_time);
[[nodiscard]] AssetFileLoadDecision plan_asset_file_load(
std::string_view absolute_path,
bool already_loaded,