diff options
| author | 2020-07-25 18:53:25 -0400 | |
|---|---|---|
| committer | 2020-07-25 19:04:53 -0400 | |
| commit | 5dab23e0171fd9fcb1976ac13e484ee7cf166e29 (patch) | |
| tree | bbffe822135d0e9578588b01fae8bf807c1cbe3a /src/core/hle/service/vi | |
| parent | Merge pull request #4350 from ogniK5377/hid-update-connected (diff) | |
| download | yuzu-5dab23e0171fd9fcb1976ac13e484ee7cf166e29.tar.gz yuzu-5dab23e0171fd9fcb1976ac13e484ee7cf166e29.tar.xz yuzu-5dab23e0171fd9fcb1976ac13e484ee7cf166e29.zip | |
nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return
value of Lock() which is correct.
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: | |||
| 511 | LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id, | 511 | LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id, |
| 512 | static_cast<u32>(transaction), flags); | 512 | static_cast<u32>(transaction), flags); |
| 513 | 513 | ||
| 514 | nv_flinger->Lock(); | 514 | const auto guard = nv_flinger->Lock(); |
| 515 | auto& buffer_queue = nv_flinger->FindBufferQueue(id); | 515 | auto& buffer_queue = nv_flinger->FindBufferQueue(id); |
| 516 | 516 | ||
| 517 | switch (transaction) { | 517 | switch (transaction) { |
| @@ -551,7 +551,7 @@ private: | |||
| 551 | [=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, | 551 | [=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, |
| 552 | Kernel::ThreadWakeupReason reason) { | 552 | Kernel::ThreadWakeupReason reason) { |
| 553 | // Repeat TransactParcel DequeueBuffer when a buffer is available | 553 | // Repeat TransactParcel DequeueBuffer when a buffer is available |
| 554 | nv_flinger->Lock(); | 554 | const auto guard = nv_flinger->Lock(); |
| 555 | auto& buffer_queue = nv_flinger->FindBufferQueue(id); | 555 | auto& buffer_queue = nv_flinger->FindBufferQueue(id); |
| 556 | auto result = buffer_queue.DequeueBuffer(width, height); | 556 | auto result = buffer_queue.DequeueBuffer(width, height); |
| 557 | ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer."); | 557 | ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer."); |