Skip to content

Commit 4649bf3

Browse files
SirHrVedelp33k-a-b00
authored andcommitted
coreinit: Stub MCP_DemoGetRemainder to 99 (cemu-project#1902)
1 parent caed3a9 commit 4649bf3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,15 @@ namespace coreinit
421421
return 0;
422422
}
423423

424+
uint32 MCP_DemoLaunchGetRemainder(uint32 mcpHandle, uint64 titleId, uint32be* outRemainder)
425+
{
426+
// stub to always return 99 uses remaining for game demos.
427+
// used by drmapp.rpl to determine remaining uses for game demos
428+
if (outRemainder)
429+
*outRemainder = 99;
430+
return 0;
431+
}
432+
424433
void InitializeMCP()
425434
{
426435
osLib_addFunction("coreinit", "MCP_Open", coreinitExport_MCP_Open);
@@ -450,6 +459,7 @@ namespace coreinit
450459
cafeExportRegister("coreinit", MCP_GetEcoSettings, LogType::Placeholder);
451460

452461
cafeExportRegister("coreinit", MCP_GetTitleId, LogType::Placeholder);
462+
cafeExportRegister("coreinit", MCP_DemoLaunchGetRemainder, LogType::Placeholder);
453463
}
454464

455465
}

0 commit comments

Comments
 (0)