From c11d83e9d8980bdc8978001583ddaa5ca0b6529b Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Fri, 3 May 2024 02:41:05 +0200 Subject: [PATCH] coreinit: Implement MCP_GetTitleId --- src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp b/src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp index 14d7a645..330663ac 100644 --- a/src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp +++ b/src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp @@ -415,6 +415,12 @@ namespace coreinit return 0; } + uint32 MCP_GetTitleId(uint32 mcpHandle, uint64be* outTitleId) + { + *outTitleId = CafeSystem::GetForegroundTitleId(); + return 0; + } + void InitializeMCP() { osLib_addFunction("coreinit", "MCP_Open", coreinitExport_MCP_Open); @@ -442,6 +448,8 @@ namespace coreinit cafeExportRegister("coreinit", MCP_RightCheckLaunchable, LogType::Placeholder); cafeExportRegister("coreinit", MCP_GetEcoSettings, LogType::Placeholder); + + cafeExportRegister("coreinit", MCP_GetTitleId, LogType::Placeholder); } }