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_info.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 'src/core/hle/kernel/svc/svc_info.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_info.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index ad56e2fe6..58dc47508 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -44,7 +44,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidEnumValue; } - const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); + const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); KScopedAutoObject process = handle_table.GetObject<KProcess>(handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Process is not valid! info_id={}, info_sub_id={}, handle={:08X}", @@ -154,7 +154,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - KProcess* const current_process = system.Kernel().CurrentProcess(); + KProcess* const current_process = GetCurrentProcessPointer(system.Kernel()); KHandleTable& handle_table = current_process->GetHandleTable(); const auto resource_limit = current_process->GetResourceLimit(); if (!resource_limit) { @@ -183,7 +183,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - *result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id); + *result = GetCurrentProcess(system.Kernel()).GetRandomEntropy(info_sub_id); return ResultSuccess; case InfoType::InitialProcessIdRange: @@ -200,9 +200,9 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - KScopedAutoObject thread = - system.Kernel().CurrentProcess()->GetHandleTable().GetObject<KThread>( - static_cast<Handle>(handle)); + KScopedAutoObject thread = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject<KThread>(static_cast<Handle>(handle)); if (thread.IsNull()) { LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", static_cast<Handle>(handle)); @@ -249,7 +249,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle R_UNLESS(info_sub_id == 0, ResultInvalidCombination); // Get the handle table. - KProcess* current_process = system.Kernel().CurrentProcess(); + KProcess* current_process = GetCurrentProcessPointer(system.Kernel()); KHandleTable& handle_table = current_process->GetHandleTable(); // Get a new handle for the current process. |