Skip to content

Commit

Permalink
Don't reset elapsed time every resize on DXGI interop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Mar 25, 2024
1 parent 6ccc6d0 commit 7b07e56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vulkan/wsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ bool WSI::init_device()
dxgi.reset(new DXGIInteropSwapchain);
if (!dxgi->init_interop_device(*device))
dxgi.reset();
else
platform->get_frame_timer().reset();
#endif
return true;
}
Expand All @@ -182,6 +184,8 @@ bool WSI::init_device(DeviceHandle device_handle)
dxgi.reset(new DXGIInteropSwapchain);
if (!dxgi->init_interop_device(*device))
dxgi.reset();
else
platform->get_frame_timer().reset();
#endif
return true;
}
Expand Down Expand Up @@ -241,7 +245,6 @@ bool WSI::init_surface_swapchain_dxgi(unsigned width, unsigned height)
swapchain_surface_format.format,
swapchain_current_prerotate,
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
platform->get_frame_timer().reset();

platform->event_swapchain_destroyed();
platform->event_swapchain_created(device.get(), swapchain, swapchain_width, swapchain_height,
Expand Down

0 comments on commit 7b07e56

Please sign in to comment.