diff options
| author | Ac_K <Acoustik666@gmail.com> | 2021-07-10 23:37:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-10 23:37:29 +0200 |
| commit | 0d841c8d5104a09d2733c0e78f6d5b7ebc8fee3e (patch) | |
| tree | 755d4edc9833e31f5a1b6bd8f17dfade4d15bf8f | |
| parent | b1a9d17cf85ab8322aeb700ad28d58f0edf63d08 (diff) | |
am: Implement CreateApplicationAndRequestToStart (#2448)
This PR implement `CreateApplicationAndRequestToStart` call, result code is checked by RE.
Now we can restart a guest program by itself. This is needed by SSBU when you changes the game language.
NOTE: This currently don't works using OpenAL backend due to another issue.
Closes #2108
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs | 20 |
1 files changed, 20 insertions, 0 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 e0633145..3ea956aa 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs @@ -79,6 +79,26 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } + [CommandHipc(12)] // 4.0.0+ + // CreateApplicationAndRequestToStart(u64 title_id) + public ResultCode CreateApplicationAndRequestToStart(ServiceCtx context) + { + ulong titleId = context.RequestData.ReadUInt64(); + + Logger.Stub?.PrintStub(LogClass.ServiceAm, new { titleId }); + + if (titleId == 0) + { + context.Device.UiHandler.ExecuteProgram(context.Device, ProgramSpecifyKind.RestartProgram, titleId); + } + else + { + throw new NotImplementedException(); + } + + return ResultCode.Success; + } + [CommandHipc(20)] // EnsureSaveData(nn::account::Uid) -> u64 public ResultCode EnsureSaveData(ServiceCtx context) |
