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:
@ -158,7 +158,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
||||
// NotifyRunning() -> b8
|
||||
public ResultCode NotifyRunning(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(1);
|
||||
context.ResponseData.Write(true);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
@ -195,6 +195,17 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(90)] // 4.0.0+
|
||||
// EnableApplicationCrashReport(u8)
|
||||
public ResultCode EnableApplicationCrashReport(ServiceCtx context)
|
||||
{
|
||||
bool applicationCrashReportEnabled = context.RequestData.ReadBoolean();
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceAm, new { applicationCrashReportEnabled });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(100)] // 5.0.0+
|
||||
// InitializeApplicationCopyrightFrameBuffer(s32 width, s32 height, handle<copy, transfer_memory> transfer_memory, u64 transfer_memory_size)
|
||||
public ResultCode InitializeApplicationCopyrightFrameBuffer(ServiceCtx context)
|
||||
@ -319,6 +330,22 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
||||
return (ResultCode)QueryPlayStatisticsManager.GetPlayStatistics(context, true);
|
||||
}
|
||||
|
||||
[Command(123)] // 5.0.0+
|
||||
// GetPreviousProgramIndex() -> s32 program_index
|
||||
public ResultCode GetPreviousProgramIndex(ServiceCtx context)
|
||||
{
|
||||
// TODO: The output PreviousProgramIndex is -1 when there was no previous title.
|
||||
// When multi-process will be supported, return the last program index.
|
||||
|
||||
int previousProgramIndex = -1;
|
||||
|
||||
context.ResponseData.Write(previousProgramIndex);
|
||||
|
||||
Logger.PrintStub(LogClass.ServiceAm, new { previousProgramIndex });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(130)] // 8.0.0+
|
||||
// GetGpuErrorDetectedSystemEvent() -> handle<copy>
|
||||
public ResultCode GetGpuErrorDetectedSystemEvent(ServiceCtx context)
|
||||
|
Reference in New Issue
Block a user