feat(render): implement Campaign AR and terrain fidelity
This commit is contained in:
parent
99cf26e00c
commit
7a5f96ede5
368 changed files with 50611 additions and 950 deletions
|
|
@ -76,14 +76,14 @@ internal sealed record RuntimeSettingsSnapshot(
|
|||
|
||||
internal interface IRuntimeSettingsStartupTarget
|
||||
{
|
||||
void ApplyDisplay(DisplaySettings display);
|
||||
RuntimeDisplayApplyResult ApplyDisplay(DisplaySettings display);
|
||||
|
||||
void ApplyAudio(AudioSettings audio);
|
||||
}
|
||||
|
||||
internal interface IRuntimeSettingsTargets
|
||||
{
|
||||
void ApplyDisplayWindowState(DisplaySettings display);
|
||||
RuntimeDisplayApplyResult ApplyDisplayWindowState(DisplaySettings display);
|
||||
|
||||
/// <summary>
|
||||
/// Campaign OP slice OP6 (2026-08-11): pushes the CURRENT audio
|
||||
|
|
@ -195,6 +195,13 @@ internal sealed class RuntimeSettingsController :
|
|||
|
||||
public QualitySettings ResolvedQuality { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Successful committed display changes. Render-pack selection listens to
|
||||
/// this edge and defers the actual candidate swap to its next stable frame
|
||||
/// boundary; failed persistence never changes the live selection.
|
||||
/// </summary>
|
||||
public event Action<DisplaySettings>? DisplayChanged;
|
||||
|
||||
// OP9: the optional developer-tools draft-preview view model
|
||||
// (SettingsVM) was retired — it had zero production construction
|
||||
// sites (only tests ever called CreateViewModel). HasDraftPreview is
|
||||
|
|
@ -216,7 +223,16 @@ internal sealed class RuntimeSettingsController :
|
|||
|
||||
if (!_startupDisplayApplied)
|
||||
{
|
||||
target.ApplyDisplay(Startup.Display);
|
||||
RuntimeDisplayApplyResult result = target.ApplyDisplay(Startup.Display);
|
||||
DisplaySettings applied = ReconcileDisplayResult(Startup.Display, result);
|
||||
if (!ReferenceEquals(applied, Startup.Display))
|
||||
{
|
||||
_storage.SaveDisplay(applied);
|
||||
Display = applied;
|
||||
_log(
|
||||
$"settings: startup fullscreen request reconciled to "
|
||||
+ $"native state {applied.Fullscreen}");
|
||||
}
|
||||
_startupDisplayApplied = true;
|
||||
}
|
||||
if (!_startupAudioApplied)
|
||||
|
|
@ -420,16 +436,43 @@ internal sealed class RuntimeSettingsController :
|
|||
{
|
||||
_storage.SaveDisplay(display);
|
||||
_log($"settings: display saved to {_storage.Location}");
|
||||
_runtimeTargets?.ApplyDisplayWindowState(display);
|
||||
Display = display;
|
||||
ReapplyQualityPreset(display.Quality);
|
||||
RuntimeDisplayApplyResult result = _runtimeTargets is null
|
||||
? new RuntimeDisplayApplyResult(display.Fullscreen)
|
||||
: _runtimeTargets.ApplyDisplayWindowState(display);
|
||||
DisplaySettings applied = ReconcileDisplayResult(display, result);
|
||||
if (!ReferenceEquals(applied, display))
|
||||
{
|
||||
_storage.SaveDisplay(applied);
|
||||
_log(
|
||||
$"settings: fullscreen request reconciled to native state "
|
||||
+ $"{applied.Fullscreen}");
|
||||
}
|
||||
Display = applied;
|
||||
ReapplyQualityPreset(applied.Quality);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log($"settings: display save failed: {ex.Message}");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DisplayChanged?.Invoke(Display);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log($"settings: display observer failed: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private static DisplaySettings ReconcileDisplayResult(
|
||||
DisplaySettings requested,
|
||||
RuntimeDisplayApplyResult result) =>
|
||||
requested.Fullscreen == result.Fullscreen
|
||||
? requested
|
||||
: requested with { Fullscreen = result.Fullscreen };
|
||||
|
||||
/// <summary>Widened from private to public at Campaign OP slice OP6,
|
||||
/// same reason as <see cref="SaveDisplay"/>. Also now pushes the saved
|
||||
/// snapshot into the live engine via
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue