mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 02:32:46 +01:00
nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return value of Lock() which is correct.
This commit is contained in:
parent
a2e1810287
commit
5dab23e017
3 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ NVFlinger::NVFlinger(Core::System& system) : system(system) {
|
||||||
// Schedule the screen composition events
|
// Schedule the screen composition events
|
||||||
composition_event = Core::Timing::CreateEvent(
|
composition_event = Core::Timing::CreateEvent(
|
||||||
"ScreenComposition", [this](u64, std::chrono::nanoseconds ns_late) {
|
"ScreenComposition", [this](u64, std::chrono::nanoseconds ns_late) {
|
||||||
Lock();
|
const auto guard = Lock();
|
||||||
Compose();
|
Compose();
|
||||||
|
|
||||||
const auto ticks = std::chrono::nanoseconds{GetNextTicks()};
|
const auto ticks = std::chrono::nanoseconds{GetNextTicks()};
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
|
|
||||||
s64 GetNextTicks() const;
|
s64 GetNextTicks() const;
|
||||||
|
|
||||||
std::unique_lock<std::mutex> Lock() {
|
std::unique_lock<std::mutex> Lock() const {
|
||||||
return std::unique_lock{*guard};
|
return std::unique_lock{*guard};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -511,7 +511,7 @@ private:
|
||||||
LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id,
|
LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id,
|
||||||
static_cast<u32>(transaction), flags);
|
static_cast<u32>(transaction), flags);
|
||||||
|
|
||||||
nv_flinger->Lock();
|
const auto guard = nv_flinger->Lock();
|
||||||
auto& buffer_queue = nv_flinger->FindBufferQueue(id);
|
auto& buffer_queue = nv_flinger->FindBufferQueue(id);
|
||||||
|
|
||||||
switch (transaction) {
|
switch (transaction) {
|
||||||
|
@ -551,7 +551,7 @@ private:
|
||||||
[=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
[=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
||||||
Kernel::ThreadWakeupReason reason) {
|
Kernel::ThreadWakeupReason reason) {
|
||||||
// Repeat TransactParcel DequeueBuffer when a buffer is available
|
// 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& buffer_queue = nv_flinger->FindBufferQueue(id);
|
||||||
auto result = buffer_queue.DequeueBuffer(width, height);
|
auto result = buffer_queue.DequeueBuffer(width, height);
|
||||||
ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer.");
|
ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer.");
|
||||||
|
|
Loading…
Reference in a new issue