Skip to content

Commit f611561

Browse files
committed
Fix crash when resizing the window
1 parent 882f5d8 commit f611561

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplication.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ public void OnUpdate(TimeSpan time)
8585
if (this.isResizePending)
8686
{
8787
// Resize the swapchain if needed (the size is calculated automatically)
88-
this.canvasSwapChain!.ResizeBuffers(
89-
newWidth: 0,
90-
newHeight: 0,
91-
newDpi: DisplayInformation.GetForCurrentView().LogicalDpi);
88+
this.canvasSwapChain!.ResizeBuffers(0, 0);
9289

9390
BitmapSize bitmapSize = this.canvasSwapChain!.SizeInPixels;
9491

0 commit comments

Comments
 (0)