summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/core/nvmap.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-06 15:12:58 +0200
committerGitHub <noreply@github.com>2023-09-06 15:12:58 +0200
commit5e424d791bd98c18a81a36405a419237abcc8116 (patch)
treedd83795955a607612d27f324bdb1bfab63de2c38 /src/core/hle/service/nvdrv/core/nvmap.cpp
parentMerge pull request #11437 from liamwhite/dump-shenanigans (diff)
parentmsvc: set warning level to /W4 globally (diff)
downloadyuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.gz
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.bz2
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.lz
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.xz
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.tar.zst
yuzu-5e424d791bd98c18a81a36405a419237abcc8116.zip
Diffstat (limited to 'src/core/hle/service/nvdrv/core/nvmap.cpp')
-rw-r--r--src/core/hle/service/nvdrv/core/nvmap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/core/nvmap.cpp b/src/core/hle/service/nvdrv/core/nvmap.cpp
index a51ca5444..0ca05257e 100644
--- a/src/core/hle/service/nvdrv/core/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/core/nvmap.cpp
@@ -160,8 +160,8 @@ u32 NvMap::PinHandle(NvMap::Handle::Id handle) {
u32 address{};
auto& smmu_allocator = host1x.Allocator();
auto& smmu_memory_manager = host1x.MemoryManager();
- while (!(address =
- smmu_allocator.Allocate(static_cast<u32>(handle_description->aligned_size)))) {
+ while ((address = smmu_allocator.Allocate(
+ static_cast<u32>(handle_description->aligned_size))) == 0) {
// Free handles until the allocation succeeds
std::scoped_lock queueLock(unmap_queue_lock);
if (auto freeHandleDesc{unmap_queue.front()}) {