diff options
| author | bunnei <bunneidev@gmail.com> | 2020-07-26 09:19:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-26 09:19:24 -0700 |
| commit | 08f02836d8c03bfc92797d1df456cdc4a927daa8 (patch) | |
| tree | a31af6e895acf8cff027a4a0e183965594f98186 /src/core/hle/service/vi | |
| parent | 4524e1bd54c965535c387fc79991671176d5708f (diff) | |
| parent | 7b070bbf62bc42daba7e28b292413ddc2ecf450a (diff) | |
Merge pull request #4426 from lioncash/lock
nvflinger: Use return value of Lock()
Diffstat (limited to 'src/core/hle/service/vi')
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index ea7b4ae13..825d11a3f 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -511,7 +511,7 @@ private: LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id, static_cast<u32>(transaction), flags); - nv_flinger->Lock(); + const auto guard = nv_flinger->Lock(); auto& buffer_queue = nv_flinger->FindBufferQueue(id); switch (transaction) { @@ -551,7 +551,7 @@ private: [=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, Kernel::ThreadWakeupReason reason) { // Repeat TransactParcel DequeueBuffer when a buffer is available - nv_flinger->Lock(); + const auto guard = nv_flinger->Lock(); auto& buffer_queue = nv_flinger->FindBufferQueue(id); auto result = buffer_queue.DequeueBuffer(width, height); ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer."); |
