From 298b6c3959fce51d55d25f6b9f9fdfd82b5b30db Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 May 2026 15:13:23 +0000 Subject: [PATCH] [HLE] Stub ILibrarySelfAccessor:ExitAndReturn (10) (#96) Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/96 --- .../ILibraryAppletSelfAccessor.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletProxy/ILibraryAppletSelfAccessor.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletProxy/ILibraryAppletSelfAccessor.cs index 44c4d133a..fa986de93 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletProxy/ILibraryAppletSelfAccessor.cs +++ b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletProxy/ILibraryAppletSelfAccessor.cs @@ -1,4 +1,5 @@ using Ryujinx.Common; +using Ryujinx.Common.Logging; using System; namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletProxy @@ -60,6 +61,19 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib return ResultCode.Success; } + + [CommandCmif(10)] + // ExitProcessAndReturn -> nn::am::service::LibraryAppletInfo + public ResultCode ExitProcessAndReturn(ServiceCtx context) + { + // Exits the LibraryApplet and returns to running the title which launched this LibraryApplet (qlaunch for example). + // On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. + // Since we don't currently support qlaunch, it's fine to stub it. + + Logger.Stub?.PrintStub(LogClass.Service); + return ResultCode.Success; + } + [CommandCmif(11)] // GetLibraryAppletInfo() -> nn::am::service::LibraryAppletInfo @@ -83,7 +97,8 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib AppletIdentifyInfo appletIdentifyInfo = new() { AppletId = AppletId.QLaunch, - TitleId = 0x0100000000001000, + // 0x4 padding + TitleId = 0x0100000000001000, // qlaunch systemAppletMenu title ID }; context.ResponseData.WriteStruct(appletIdentifyInfo);