fix: stopped overlayDisp from crashing

This commit is contained in:
Jacobwasbeast 2025-02-12 21:29:29 -06:00
parent 125edb894b
commit 8bc5d1e61d
6 changed files with 37 additions and 12 deletions

View File

@ -24,6 +24,8 @@ namespace Ryujinx.HLE.HOS.Applets
case AppletId.LibAppletWeb:
case AppletId.LibAppletShop:
case AppletId.LibAppletOff:
case AppletId.LibAppletOffFw17:
case AppletId.LibAppletOff2Fw17:
return new BrowserApplet();
case AppletId.Cabinet:
return new CabinetApplet(system);

View File

@ -317,21 +317,22 @@ namespace Ryujinx.HLE.HOS.Applets
}
private void SendButtonAppletMessageLocked(AppletMessage message)
{
if (_homeMenu != null)
{
lock (_homeMenu.Lock)
{
if (message == AppletMessage.DetectShortPressingHomeButton)
{
foreach (var applet in _applets.Values)
{
if (applet != _homeMenu && _foregroundRequestedApplet==applet)
if (applet != _homeMenu && applet != _overlayDisp && _foregroundRequestedApplet==applet)
{
applet.ProcessHandle.SetActivity(true);
}
}
}
if (_homeMenu != null)
{
lock (_homeMenu.Lock)
{
_homeMenu.AppletState.PushUnorderedMessage(message);
}
}
@ -621,7 +622,7 @@ namespace Ryujinx.HLE.HOS.Applets
public void PauseOldWindows(ulong pid)
{
RealApplet applet = GetByAruId(pid);
if (applet?.CallerApplet != null&&applet?.CallerApplet!=_homeMenu)
if (applet?.CallerApplet != null&&applet?.CallerApplet!=_homeMenu&&applet?.CallerApplet!=_overlayDisp)
{
applet.CallerApplet.ProcessHandle.SetActivity(true);
}

View File

@ -319,6 +319,14 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
return ResultCode.Success;
}
[CommandCmif(68)]
// GetBuiltInDisplayType() -> u32 type
public ResultCode GetBuiltInDisplayType(ServiceCtx context)
{
context.ResponseData.Write(0);
return ResultCode.Success;
}
[CommandCmif(91)] // 7.0.0+
// GetCurrentPerformanceConfiguration() -> nn::apm::PerformanceConfiguration
public ResultCode GetCurrentPerformanceConfiguration(ServiceCtx context)

View File

@ -20,6 +20,8 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
PhotoViewer = 0x15,
Settings = 0x16,
LibAppletOff = 0x17,
LibAppletOffFw17 = 0x32,
LibAppletOff2Fw17 = 0x33,
LibAppletWhitelisted = 0x18,
LibAppletAuth = 0x19,
MyPage = 0x1A,

View File

@ -1,4 +1,6 @@
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel.Threading;
namespace Ryujinx.HLE.HOS.Services.Audio
{
@ -80,6 +82,16 @@ namespace Ryujinx.HLE.HOS.Services.Audio
return ResultCode.Success;
}
[CommandCmif(34)]
// AcquireTargetNotification() -> handle<copy>
public ResultCode AcquireTargetNotification(ServiceCtx context)
{
KEvent ev = new KEvent(context.Device.System.KernelContext);
context.Process.HandleTable.GenerateHandle(ev.ReadableEvent, out int handle);
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
return ResultCode.Success;
}
[CommandCmif(5000)]
// Unknown5000() -> bool // 19.0.0+
public ResultCode Unknown5000(ServiceCtx context)

View File

@ -967,7 +967,7 @@ namespace Ryujinx.Ava
ConfigurationState.Instance.Multiplayer.LdnServer,
ConfigurationState.Instance.Graphics.CustomVSyncInterval.Value,
ConfigurationState.Instance.Hacks.ShowDirtyHacks ? ConfigurationState.Instance.Hacks.EnabledHacks : null));
//Device.LoadSystemProgramId(0x010000000000100C);
Device.LoadSystemProgramId(0x010000000000100C);
}
private static IHardwareDeviceDriver InitializeAudio()