mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-18 19:25:48 +00:00
HLE: Return LastUrl for Web/Offline BrowserApplet exit reason
Fixes infinite loop on title screen for Ni no Kuni when no save file exists.
This commit is contained in:
@@ -38,11 +38,17 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
|||||||
Logger.Stub?.PrintStub(LogClass.ServiceAm, $"{argument.Type}: {argument.GetValue()}");
|
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))
|
if ((_commonArguments.AppletVersion >= 0x80000 && _shimKind == ShimKind.Web) || (_commonArguments.AppletVersion >= 0x30000 && _shimKind == ShimKind.Share))
|
||||||
{
|
{
|
||||||
List<BrowserOutput> result =
|
List<BrowserOutput> result =
|
||||||
[
|
[
|
||||||
new(BrowserOutputType.ExitReason, (uint)WebExitReason.ExitButton)
|
new(BrowserOutputType.ExitReason, (uint)exitReason)
|
||||||
];
|
];
|
||||||
|
|
||||||
_normalSession.Push(BuildResponseNew(result));
|
_normalSession.Push(BuildResponseNew(result));
|
||||||
@@ -51,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
|||||||
{
|
{
|
||||||
WebCommonReturnValue result = new()
|
WebCommonReturnValue result = new()
|
||||||
{
|
{
|
||||||
ExitReason = WebExitReason.ExitButton,
|
ExitReason = exitReason,
|
||||||
};
|
};
|
||||||
|
|
||||||
_normalSession.Push(BuildResponseOld(result));
|
_normalSession.Push(BuildResponseOld(result));
|
||||||
|
|||||||
Reference in New Issue
Block a user