Merge branch 'browser-applet-lasturl-fix' into 'master'

HLE: Return LastUrl for Web/Offline BrowserApplet exit reason

See merge request [ryubing/ryujinx!250](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/250)
This commit is contained in:
Digote
2026-02-19 15:40:11 -06:00

View File

@@ -38,11 +38,17 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
Logger.Stub?.PrintStub(LogClass.ServiceAm, $"{argument.Type}: {argument.GetValue()}");
}
// Web and Offline browser applets use LastUrl as the completion result.
// Non-navigation shims (Shop, Login, Share, etc.) do not depend on navigation state and expect ExitButton.
WebExitReason exitReason = (_shimKind == ShimKind.Web || _shimKind == ShimKind.Offline)
? WebExitReason.LastUrl
: WebExitReason.ExitButton;
if ((_commonArguments.AppletVersion >= 0x80000 && _shimKind == ShimKind.Web) || (_commonArguments.AppletVersion >= 0x30000 && _shimKind == ShimKind.Share))
{
List<BrowserOutput> result =
[
new(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton)
new(BrowserOutputType.ExitReason, (uint)exitReason)
];
_normalSession.Push(BuildResponseNew(result));
@@ -51,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
{
WebCommonReturnValue result = new()
{
ExitReason = WebExitReason.ExitButton,
ExitReason = exitReason,
};
_normalSession.Push(BuildResponseOld(result));