Skip to content

Commit 7b07e56

Browse files
committed
Don't reset elapsed time every resize on DXGI interop.
1 parent 6ccc6d0 commit 7b07e56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vulkan/wsi.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ bool WSI::init_device()
168168
dxgi.reset(new DXGIInteropSwapchain);
169169
if (!dxgi->init_interop_device(*device))
170170
dxgi.reset();
171+
else
172+
platform->get_frame_timer().reset();
171173
#endif
172174
return true;
173175
}
@@ -182,6 +184,8 @@ bool WSI::init_device(DeviceHandle device_handle)
182184
dxgi.reset(new DXGIInteropSwapchain);
183185
if (!dxgi->init_interop_device(*device))
184186
dxgi.reset();
187+
else
188+
platform->get_frame_timer().reset();
185189
#endif
186190
return true;
187191
}
@@ -241,7 +245,6 @@ bool WSI::init_surface_swapchain_dxgi(unsigned width, unsigned height)
241245
swapchain_surface_format.format,
242246
swapchain_current_prerotate,
243247
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
244-
platform->get_frame_timer().reset();
245248

246249
platform->event_swapchain_destroyed();
247250
platform->event_swapchain_created(device.get(), swapchain, swapchain_width, swapchain_height,

0 commit comments

Comments
 (0)