Skip to content

Commit

Permalink
layer: Fix locking in presentation timing funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Oct 1, 2023
1 parent 3f7768f commit c707e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layer/VkLayer_FROG_gamescope_wsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ namespace GamescopeWSILayer {

uint32_t originalCount = *pPresentationTimingCount;

std::unique_lock(*gamescopeSwapchain->presentTimingMutex);
std::unique_lock lock(*gamescopeSwapchain->presentTimingMutex);
auto& timings = gamescopeSwapchain->pastPresentTimings;

VkResult result = vkroots::helpers::array(timings, pPresentationTimingCount, pPresentationTimings);
Expand All @@ -998,7 +998,7 @@ namespace GamescopeWSILayer {
if (waylandPumpEvents(gamescopeSwapchain->display) < 0)
return VK_ERROR_SURFACE_LOST_KHR;

std::unique_lock(*gamescopeSwapchain->presentTimingMutex);
std::unique_lock lock(*gamescopeSwapchain->presentTimingMutex);
pDisplayTimingProperties->refreshDuration = gamescopeSwapchain->refreshCycle;

return VK_SUCCESS;
Expand Down

0 comments on commit c707e15

Please sign in to comment.