From 00600f936f996c3e545ac32f6b12ca2dfd4a7796 Mon Sep 17 00:00:00 2001 From: Kevin Ivarsen Date: Fri, 2 Dec 2022 13:00:15 -0800 Subject: [PATCH] Fix crash when launching ControlCatalog.Desktop (see #9599) --- src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs b/src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs index f059c18257..d606b00109 100644 --- a/src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs +++ b/src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs @@ -1245,7 +1245,7 @@ namespace Avalonia.Win32.DxgiSwapchain internal RECT DesktopCoordinates; - internal bool AttachedToDesktop; + internal int AttachedToDesktop; // BOOL maps to int. If we use the CLR 'bool' type here, the struct becomes non-blittable. See #9599 internal DXGI_MODE_ROTATION Rotation; @@ -1323,7 +1323,7 @@ namespace Avalonia.Win32.DxgiSwapchain public uint Width; public uint Height; public DXGI_FORMAT Format; - public bool Stereo; + public int Stereo; // BOOL maps to int. If we use the CLR 'bool' type here, the struct becomes non-blittable. See #9599 public DXGI_SAMPLE_DESC SampleDesc; public uint BufferUsage; public uint BufferCount;