VERY experimental Nintendo Switch 2 emulator
C++
syncpoint_manager: Mark IsSyncpointAllocated() as const
Lioncasheb1bdc5ed43e
diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cppindex 8d14116d5e..aba51d280a 100644--- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp+++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp@@ -63,7 +63,7 @@ void SyncpointManager::FreeSyncpoint(u32 id) {syncpoint.reserved = false;}-bool SyncpointManager::IsSyncpointAllocated(u32 id) {+bool SyncpointManager::IsSyncpointAllocated(u32 id) const {return (id <= SyncpointCount) && syncpoints[id].reserved;}@@ -72,7 +72,7 @@ bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) const {if (!syncpoint.reserved) {ASSERT(false);- return 0;+ return false;}// If the interface manages counters then we don't keep track of the maximum value as it handlesdiff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.h b/src/core/hle/service/nvdrv/core/syncpoint_manager.hindex b76ef90326..4f2cefae5d 100644--- a/src/core/hle/service/nvdrv/core/syncpoint_manager.h+++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.h@@ -44,7 +44,7 @@ public:/*** @brief Checks if the given syncpoint is both allocated and below the number of HW syncpoints*/- bool IsSyncpointAllocated(u32 id);+ bool IsSyncpointAllocated(u32 id) const;/*** @brief Finds a free syncpoint and reserves it