summaryrefslogtreecommitdiffstats
path: root/examples/hello-world
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello-world')
-rw-r--r--examples/hello-world/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/hello-world/main.cpp b/examples/hello-world/main.cpp
index 7b43abcab..b3bee9c07 100644
--- a/examples/hello-world/main.cpp
+++ b/examples/hello-world/main.cpp
@@ -322,8 +322,7 @@ Slang::Result initialize()
swapchainDesc.height = gWindowHeight;
swapchainDesc.imageCount = kSwapchainImageCount;
swapchainDesc.queue = gQueue;
- gfx::WindowHandle windowHandle;
- memcpy(&windowHandle, &gWindow->getNativeHandle(), sizeof(windowHandle));
+ gfx::WindowHandle windowHandle = gWindow->getNativeHandle().convert<gfx::WindowHandle>();
gSwapchain = gDevice->createSwapchain(swapchainDesc, windowHandle);
IFramebufferLayout::AttachmentLayout renderTargetLayout = {gSwapchain->getDesc().format, 1};