summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2022-06-21 02:39:10 +0200
committercomex <comexk@gmail.com>2022-06-26 01:23:23 +0200
commit48737a4bb2372d4564f369694df7c2ca5812bf25 (patch)
tree132290c6188d3f977ef6d2afd4b5259f7e763888 /src
parentMerge pull request #8500 from liamwhite/poke (diff)
downloadyuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar.gz
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar.bz2
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar.lz
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar.xz
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.tar.zst
yuzu-48737a4bb2372d4564f369694df7c2ca5812bf25.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 2ff6d5fa6..0aa068f1d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -692,6 +692,9 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
// 6.0.0+
TotalPhysicalMemoryAvailableWithoutSystemResource = 21,
TotalPhysicalMemoryUsedWithoutSystemResource = 22,
+
+ // Homebrew only
+ MesosphereCurrentProcess = 65001,
};
const auto info_id_type = static_cast<GetInfoType>(info_id);
@@ -914,6 +917,17 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
*result = system.Kernel().CurrentScheduler()->GetIdleThread()->GetCpuTime();
return ResultSuccess;
}
+ case GetInfoType::MesosphereCurrentProcess: {
+ R_UNLESS(handle == InvalidHandle, ResultInvalidHandle);
+ R_UNLESS(info_sub_id == 0, ResultInvalidCombination);
+
+ KProcess* const current_process = system.Kernel().CurrentProcess();
+ Handle process_handle{};
+ R_TRY(current_process->GetHandleTable().Add(&process_handle, current_process));
+
+ *result = process_handle;
+ return ResultSuccess;
+ }
default:
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
return ResultInvalidEnumValue;