From d063f26efc8811084eabf028799abbe2f6c1067e Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Mon, 22 Apr 2024 23:37:45 +0200 Subject: [PATCH] Remove resource limit checks for now. (#89) --- src/core/hle/kernel/resource_limit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp index 4575cab37..0b0776423 100644 --- a/src/core/hle/kernel/resource_limit.cpp +++ b/src/core/hle/kernel/resource_limit.cpp @@ -45,10 +45,10 @@ bool ResourceLimit::Reserve(ResourceLimitType type, s32 amount) { const auto index = static_cast(type); const s32 limit = m_limit_values[index]; const s32 new_value = m_current_values[index] + amount; + // TODO(PabloMK7): Fix all resource limit bugs and return an error, instead of ignoring it. if (new_value > limit) { LOG_ERROR(Kernel, "New value {} exceeds limit {} for resource type {}", new_value, limit, type); - return false; } m_current_values[index] = new_value; return true; @@ -57,10 +57,10 @@ bool ResourceLimit::Reserve(ResourceLimitType type, s32 amount) { bool ResourceLimit::Release(ResourceLimitType type, s32 amount) { const auto index = static_cast(type); const s32 value = m_current_values[index]; + // TODO(PabloMK7): Fix all resource limit bugs and return an error, instead of ignoring it. if (amount > value) { LOG_ERROR(Kernel, "Amount {} exceeds current value {} for resource type {}", amount, value, type); - return false; } m_current_values[index] = value - amount; return true;