From b726b2306ef3a8191df50b4b9964a278ded65808 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 30 Jul 2024 23:41:43 -0700 Subject: [PATCH] Fix crash when resizing the window --- .../Backend/CoreWindowApplication.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplication.cs b/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplication.cs index 725c97bb..4640c165 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplication.cs +++ b/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplication.cs @@ -85,10 +85,7 @@ internal sealed class CoreWindowApplication if (this.isResizePending) { // Resize the swapchain if needed (the size is calculated automatically) - this.canvasSwapChain!.ResizeBuffers( - newWidth: 0, - newHeight: 0, - newDpi: DisplayInformation.GetForCurrentView().LogicalDpi); + this.canvasSwapChain!.ResizeBuffers(0, 0); BitmapSize bitmapSize = this.canvasSwapChain!.SizeInPixels;