Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit d063f26

Browse files
authored
Remove resource limit checks for now. (#89)
1 parent b1e5485 commit d063f26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/hle/kernel/resource_limit.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ bool ResourceLimit::Reserve(ResourceLimitType type, s32 amount) {
4545
const auto index = static_cast<std::size_t>(type);
4646
const s32 limit = m_limit_values[index];
4747
const s32 new_value = m_current_values[index] + amount;
48+
// TODO(PabloMK7): Fix all resource limit bugs and return an error, instead of ignoring it.
4849
if (new_value > limit) {
4950
LOG_ERROR(Kernel, "New value {} exceeds limit {} for resource type {}", new_value, limit,
5051
type);
51-
return false;
5252
}
5353
m_current_values[index] = new_value;
5454
return true;
@@ -57,10 +57,10 @@ bool ResourceLimit::Reserve(ResourceLimitType type, s32 amount) {
5757
bool ResourceLimit::Release(ResourceLimitType type, s32 amount) {
5858
const auto index = static_cast<std::size_t>(type);
5959
const s32 value = m_current_values[index];
60+
// TODO(PabloMK7): Fix all resource limit bugs and return an error, instead of ignoring it.
6061
if (amount > value) {
6162
LOG_ERROR(Kernel, "Amount {} exceeds current value {} for resource type {}", amount, value,
6263
type);
63-
return false;
6464
}
6565
m_current_values[index] = value - amount;
6666
return true;

0 commit comments

Comments
 (0)