fix(ui): restore retail vitals and window interactions
All checks were successful
CI / linux-portable (push) Successful in 3m16s
CI / windows-gate (push) Successful in 5m41s
CI / release (push) Successful in 2m5s

This commit is contained in:
Erik 2026-08-20 13:26:35 +02:00
parent 4d84456c21
commit 1bd2b30291
36 changed files with 1462 additions and 86 deletions

View file

@ -140,6 +140,7 @@ internal sealed class RuntimeSettingsController :
private readonly IRuntimeSettingsStorage _storage;
private readonly Func<QualityPreset, QualitySettings> _resolveQuality;
private readonly Func<uint, bool>? _characterOptionValue;
private readonly Action<string> _log;
private IRuntimeSettingsTargets? _runtimeTargets;
private CharacterSettings _defaultCharacter;
@ -156,11 +157,13 @@ internal sealed class RuntimeSettingsController :
public RuntimeSettingsController(
IRuntimeSettingsStorage storage,
Func<QualityPreset, QualitySettings>? resolveQuality = null,
Action<string>? log = null)
Action<string>? log = null,
Func<uint, bool>? characterOptionValue = null)
{
_storage = storage ?? throw new ArgumentNullException(nameof(storage));
_resolveQuality = resolveQuality ?? ResolveQuality;
_log = log ?? Console.WriteLine;
_characterOptionValue = characterOptionValue;
Display = _storage.LoadDisplay();
Audio = _storage.LoadAudio();
@ -293,6 +296,34 @@ internal sealed class RuntimeSettingsController :
_lastAppliedUiLocked = locked;
}
/// <summary>
/// Handles a user-originated request to change retail's LockUI character
/// option. The authoritative Runtime option write/send is published first;
/// the retained-root presentation follows immediately, matching retail's
/// PlayerModule write before global UI message <c>0x0D</c> broadcast.
/// Server-seed convergence must continue to call <see cref="SetUiLocked"/>
/// directly so receiving an authoritative bit never echoes it to the wire.
/// </summary>
public void RequestUiLocked(bool locked)
{
IRuntimeSettingsTargets? targets = _runtimeTargets;
if (targets is null || _characterOptionValue is null)
return;
targets.SetSingleCharacterOption(
(uint)CharacterOptionId.LockUI,
locked);
// LiveSessionCommandRouter applies RuntimeCharacterOptionsState's
// local write synchronously before the autosave send. If the route is
// inactive/displaced, Publish is intentionally dropped and the bit
// remains unchanged; do not split root presentation from authority.
if (_characterOptionValue((uint)CharacterOptionId.LockUI) != locked)
return;
SetUiLocked(locked);
}
/// <summary>
/// Retail <c>ClientCommunicationSystem::DoFrameRate @ 0x005707D0</c>
/// flips the live flag and sends the framerate-display UI notice. acdream