summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
692 // 6.0.0+ 692 // 6.0.0+
693 TotalPhysicalMemoryAvailableWithoutSystemResource = 21, 693 TotalPhysicalMemoryAvailableWithoutSystemResource = 21,
694 TotalPhysicalMemoryUsedWithoutSystemResource = 22, 694 TotalPhysicalMemoryUsedWithoutSystemResource = 22,
695
696 // Homebrew only
697 MesosphereCurrentProcess = 65001,
695 }; 698 };
696 699
697 const auto info_id_type = static_cast<GetInfoType>(info_id); 700 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
914 *result = system.Kernel().CurrentScheduler()->GetIdleThread()->GetCpuTime(); 917 *result = system.Kernel().CurrentScheduler()->GetIdleThread()->GetCpuTime();
915 return ResultSuccess; 918 return ResultSuccess;
916 } 919 }
920 case GetInfoType::MesosphereCurrentProcess: {
921 R_UNLESS(handle == InvalidHandle, ResultInvalidHandle);
922 R_UNLESS(info_sub_id == 0, ResultInvalidCombination);
923
924 KProcess* const current_process = system.Kernel().CurrentProcess();
925 Handle process_handle{};
926 R_TRY(current_process->GetHandleTable().Add(&process_handle, current_process));
927
928 *result = process_handle;
929 return ResultSuccess;
930 }
917 default: 931 default:
918 LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id); 932 LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
919 return ResultInvalidEnumValue; 933 return ResultInvalidEnumValue;