Add multiple calls to am service (#1411)
* Add multiple calls to am service This implement/stub some am calls: - SetAutoSleepDisabled - IsAutoSleepDisabled - SetAlbumImageTakenNotificationEnabled - EnableApplicationCrashReport - GetPreviousProgramIndex - NeedsToExitProcess - RequestForAppletToGetForeground - GetIndirectLayerConsumerHandle All checked by RE. Additionnaly to that, there is some cleanup here and there. Fix #1387, #1324, #1165, #1163, #1065 * Fix casting * Thread safe assign
This commit is contained in:
parent
4aa47a66c6
commit
c6e12949e5
4 changed files with 147 additions and 23 deletions
|
@ -161,5 +161,42 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
|
|||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(110)]
|
||||
// NeedsToExitProcess()
|
||||
public ResultCode NeedsToExitProcess(ServiceCtx context)
|
||||
{
|
||||
return ResultCode.Stubbed;
|
||||
}
|
||||
|
||||
[Command(150)]
|
||||
// RequestForAppletToGetForeground()
|
||||
public ResultCode RequestForAppletToGetForeground(ServiceCtx context)
|
||||
{
|
||||
return ResultCode.Stubbed;
|
||||
}
|
||||
|
||||
[Command(160)] // 2.0.0+
|
||||
// GetIndirectLayerConsumerHandle() -> u64 indirect_layer_consumer_handle
|
||||
public ResultCode GetIndirectLayerConsumerHandle(ServiceCtx context)
|
||||
{
|
||||
/*
|
||||
if (indirectLayerConsumer == null)
|
||||
{
|
||||
return ResultCode.ObjectInvalid;
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: Official sw uses this during LibraryApplet creation when LibraryAppletMode is 0x3.
|
||||
// Since we don't support IndirectLayer and the handle couldn't be 0, it's fine to return 1.
|
||||
|
||||
ulong indirectLayerConsumerHandle = 1;
|
||||
|
||||
context.ResponseData.Write(indirectLayerConsumerHandle);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceAm, new { indirectLayerConsumerHandle });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue