refactor(input): own pointer and callback lifetime

Move camera pointer, framebuffer resize, and retained/devtools input edges behind focused reversible owners. Preserve input priority while making shutdown deactivate callbacks before live-session retirement and retry physical detach without stranding transport teardown.
This commit is contained in:
Erik 2026-07-22 11:59:33 +02:00
parent d09e246d3a
commit 8b8afeefa3
42 changed files with 4029 additions and 461 deletions

View file

@ -409,13 +409,18 @@ public sealed class UpdateFrameOrchestratorTests
StringComparison.Ordinal);
Assert.DoesNotContain("wantCaptureMouse: ()", source,
StringComparison.Ordinal);
Assert.Equal(2, CountOccurrences(
source,
"_gameplayInputFrame?.EndMouseLook();"));
Assert.Contains(
"new(\"mouse capture\", () => _gameplayInputFrame?.EndMouseLook())",
Assert.DoesNotContain(
"_gameplayInputFrame?.EndMouseLook",
source,
StringComparison.Ordinal);
string pointerSource = File.ReadAllText(Path.Combine(
FindRepoRoot(),
"src",
"AcDream.App",
"Input",
"CameraPointerInputController.cs"));
Assert.Contains("_gameplayFrame?.EndMouseLook();", pointerSource,
StringComparison.Ordinal);
string teleportSource = File.ReadAllText(Path.Combine(
FindRepoRoot(),
"src",
@ -438,8 +443,7 @@ public sealed class UpdateFrameOrchestratorTests
AssertAppearsInOrder(
source,
"private void OnFocusChanged(bool focused)",
"if (!focused)",
"_gameplayInputFrame?.EndMouseLook();");
"_cameraPointerInput?.HandleFocusChanged(focused);");
}
[Fact]
@ -696,7 +700,7 @@ public sealed class UpdateFrameOrchestratorTests
"private void OnUpdate(double dt)",
"_frameProfiler.BeginStage(",
"_updateFrameOrchestrator.Tick(",
"private void OnCameraModeChanged");
"private void OnRender(double deltaSeconds)");
}
[Fact]