Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyVanNeck authored Mar 2, 2024
1 parent 5ebef80 commit 3e261c5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/platform/windows/display_wgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,8 @@ namespace platf::dxgi {
wgc_capture_t::next_frame(std::chrono::milliseconds timeout, ID3D11Texture2D **out, uint64_t &out_time) {
// this CONSUMER runs in the capture thread
release_frame();

AcquireSRWLockExclusive(&frame_lock);

if (produced_frame == nullptr && SleepConditionVariableSRW(&frame_present_cv, &frame_lock, timeout.count(), 0) == 0) {



ReleaseSRWLockExclusive(&frame_lock);
if (GetLastError() == ERROR_TIMEOUT)
return capture_e::timeout;
Expand All @@ -163,9 +158,6 @@ namespace platf::dxgi {
ReleaseSRWLockExclusive(&frame_lock);

if (consumed_frame == nullptr) // spurious wakeup



return capture_e::timeout;

auto capture_access = consumed_frame.Surface().as<winrt::IDirect3DDxgiInterfaceAccess>();
Expand Down

0 comments on commit 3e261c5

Please sign in to comment.