aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2020-07-22 06:56:00 +0200
committerGitHub <noreply@github.com>2020-07-22 14:56:00 +1000
commitc6e12949e5055dbb2fb1ff53050ab4f1d7962f08 (patch)
tree0e56824ddd26cd42c9b78c1b383fdf12169014ed /Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
parent4aa47a66c6d72707ccdf7618bcad2a8e65797e3d (diff)
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
index fb85d856..ac24dfc9 100644
--- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
+++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
@@ -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)