diff --git a/Ryujinx.HLE/HOS/Applets/AppletManager.cs b/Ryujinx.HLE/HOS/Applets/AppletManager.cs index 025d81508e..d5eaabd611 100644 --- a/Ryujinx.HLE/HOS/Applets/AppletManager.cs +++ b/Ryujinx.HLE/HOS/Applets/AppletManager.cs @@ -9,14 +9,15 @@ namespace Ryujinx.HLE.HOS.Applets static AppletManager() { - _appletMapping = new Dictionary { + _appletMapping = new Dictionary + { { AppletId.PlayerSelect, typeof(PlayerSelect) } }; } public static IApplet Create(AppletId applet, Horizon system) { - if(_appletMapping.TryGetValue(applet, out Type appletClass)) + if (_appletMapping.TryGetValue(applet, out Type appletClass)) { return (IApplet)Activator.CreateInstance(appletClass, system); } diff --git a/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelect.cs b/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelect.cs index 056a720b84..587753e768 100644 --- a/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelect.cs +++ b/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelect.cs @@ -8,21 +8,21 @@ namespace Ryujinx.HLE.HOS.Applets internal class PlayerSelect : IApplet { private Horizon _system; - private Stack _inputStack; - private Stack _outputStack; + private Queue _inputStack; + private Queue _outputStack; public event EventHandler AppletStateChanged; public PlayerSelect(Horizon system) { _system = system; - _inputStack = new Stack(); - _outputStack = new Stack(); + _inputStack = new Queue(); + _outputStack = new Queue(); } public ResultCode Start() { - _outputStack.Push(new IStorage(BuildResponse())); + _outputStack.Enqueue(new IStorage(BuildResponse())); AppletStateChanged?.Invoke(this, null); @@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Applets public ResultCode PushInData(IStorage data) { - _inputStack.Push(data); + _inputStack.Enqueue(data); return ResultCode.Success; } @@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Applets { if (_outputStack.Count > 0) { - data = _outputStack.Pop(); + data = _outputStack.Dequeue(); } else { diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs index 6d643cfb36..6cc9200657 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs @@ -1,7 +1,9 @@ -using Ryujinx.HLE.HOS.Applets; +using Ryujinx.Common.Logging; +using Ryujinx.HLE.HOS.Applets; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Kernel.Threading; +using System; namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletCreator {