[VideoOut] Allow a hidden presenter window

This commit is contained in:
ParantezTech 2026-10-08 02:52:53 +03:00
parent cf3c5ad982
commit 1869e2b728
2 changed files with 10 additions and 3 deletions

View File

@ -54,7 +54,8 @@ internal sealed unsafe class SdlHostWindow : IDisposable, IHostGamepadOutput
string title,
HostVideoOptions options,
SdlGraphicsApi graphicsApi,
Action? toggleBackendHud = null)
Action? toggleBackendHud = null,
bool hidden = false)
{
_options = options.Normalize();
_graphicsApi = graphicsApi;
@ -81,6 +82,11 @@ internal sealed unsafe class SdlHostWindow : IDisposable, IHostGamepadOutput
}
_baseTitle = title;
if (hidden)
{
return;
}
PerfOverlay.Configure(_options);
MoveToConfiguredDisplay();
ApplyConfiguredMode(_options.WindowMode);

View File

@ -253,7 +253,7 @@ internal static unsafe partial class VulkanVideoPresenter
private const ulong SwapchainAcquireTimeoutNs = 250_000_000;
public Presenter(uint width, uint height)
public Presenter(uint width, uint height, bool hidden = false)
{
_commandStream = new CommandStreamQueue(this);
_relay = new GpuWorkerRelay(WakeRenderThread, _commandStream.TryEnqueueControlBarrier);
@ -263,7 +263,8 @@ internal static unsafe partial class VulkanVideoPresenter
_window = new SdlHostWindow(
VideoOutExports.GetWindowTitle(),
_videoOptions,
SdlGraphicsApi.Vulkan);
SdlGraphicsApi.Vulkan,
hidden: hidden);
}
public void Run()