diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 5d7b1e05c6..947a370037 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -71,7 +71,7 @@ namespace Ryujinx.HLE.HOS.Applets } // If our default text is longer than the allowed length, - // we trunacte it. + // we truncate it. if (_textValue.Length > _keyboardConfig.StringLengthMax) { _textValue = _textValue.Substring(0, (int)_keyboardConfig.StringLengthMax); 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 50008783fc..fe64a50c37 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/LibraryAppletCreator/ILibraryAppletAccessor.cs @@ -95,13 +95,16 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib // PopOutData() -> object public ResultCode PopOutData(ServiceCtx context) { - byte[] data = _normalSession.Pop(); + if(_normalSession.TryPop(out byte[] data)) + { + MakeObject(context, new IStorage(data)); - MakeObject(context, new IStorage(data)); + _normalOutDataEvent.WritableEvent.Clear(); - _normalOutDataEvent.WritableEvent.Clear(); + return ResultCode.Success; + } - return ResultCode.Success; + return ResultCode.NotAvailble; } [Command(103)] @@ -119,13 +122,16 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib // PopInteractiveOutData() -> object public ResultCode PopInteractiveOutData(ServiceCtx context) { - byte[] data = _interactiveSession.Pop(); + if(_interactiveSession.TryPop(out byte[] data)) + { + MakeObject(context, new IStorage(data)); - MakeObject(context, new IStorage(data)); + _interactiveOutDataEvent.WritableEvent.Clear(); - _interactiveOutDataEvent.WritableEvent.Clear(); + return ResultCode.Success; + } - return ResultCode.Success; + return ResultCode.NotAvailble; } [Command(105)] diff --git a/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs index de83ab3995..2d2b873105 100644 --- a/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs +++ b/Ryujinx.HLE/HOS/Services/Am/ResultCode.cs @@ -7,6 +7,7 @@ namespace Ryujinx.HLE.HOS.Services.Am Success = 0, + NotAvailble = (2 << ErrorCodeShift) | ModuleId, NoMessages = (3 << ErrorCodeShift) | ModuleId, ObjectInvalid = (500 << ErrorCodeShift) | ModuleId, OutOfBounds = (503 << ErrorCodeShift) | ModuleId,