diff options
author | Liam <byteslice@airmail.cc> | 2023-02-13 16:44:41 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-02-13 17:05:14 +0100 |
commit | 4363ca304afb0b615481c7d49e863a2c429cc5c6 (patch) | |
tree | 80dbba25e98a8493944993f8992326b797305088 /src/core/hle/kernel/svc/svc_resource_limit.cpp | |
parent | Merge pull request #9784 from m-HD/master (diff) | |
download | yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.gz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.bz2 yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.lz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.xz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.zst yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc/svc_resource_limit.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/kernel/svc/svc_resource_limit.cpp b/src/core/hle/kernel/svc/svc_resource_limit.cpp index ebc886028..88166299e 100644 --- a/src/core/hle/kernel/svc/svc_resource_limit.cpp +++ b/src/core/hle/kernel/svc/svc_resource_limit.cpp @@ -27,7 +27,7 @@ Result CreateResourceLimit(Core::System& system, Handle* out_handle) { KResourceLimit::Register(kernel, resource_limit); // Add the limit to the handle table. - R_TRY(kernel.CurrentProcess()->GetHandleTable().Add(out_handle, resource_limit)); + R_TRY(GetCurrentProcess(kernel).GetHandleTable().Add(out_handle, resource_limit)); return ResultSuccess; } @@ -41,9 +41,9 @@ Result GetResourceLimitLimitValue(Core::System& system, s64* out_limit_value, R_UNLESS(IsValidResourceType(which), ResultInvalidEnumValue); // Get the resource limit. - auto& kernel = system.Kernel(); - KScopedAutoObject resource_limit = - kernel.CurrentProcess()->GetHandleTable().GetObject<KResourceLimit>(resource_limit_handle); + KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject<KResourceLimit>(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Get the limit value. @@ -61,9 +61,9 @@ Result GetResourceLimitCurrentValue(Core::System& system, s64* out_current_value R_UNLESS(IsValidResourceType(which), ResultInvalidEnumValue); // Get the resource limit. - auto& kernel = system.Kernel(); - KScopedAutoObject resource_limit = - kernel.CurrentProcess()->GetHandleTable().GetObject<KResourceLimit>(resource_limit_handle); + KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject<KResourceLimit>(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Get the current value. @@ -81,9 +81,9 @@ Result SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_ha R_UNLESS(IsValidResourceType(which), ResultInvalidEnumValue); // Get the resource limit. - auto& kernel = system.Kernel(); - KScopedAutoObject resource_limit = - kernel.CurrentProcess()->GetHandleTable().GetObject<KResourceLimit>(resource_limit_handle); + KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject<KResourceLimit>(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Set the limit value. |