Compare commits

...

2 Commits

Author SHA1 Message Date
Digote
c47b8fa7b9 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)
2026-02-09 01:08:03 -06:00
Digote
7a11fc3e2a HLE: Return LastUrl for Web/Offline BrowserApplet exit reason
Fixes infinite loop on title screen for Ni no Kuni when no save file exists.
2026-02-09 01:07:56 -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));