mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-12 02:02:04 +00:00
am: Cleaning and stub TryPopFromFriendInvitationStorageChannel (#1738)
This commit is contained in:
parent
9abdba5539
commit
fd0b9d1926
1 changed files with 35 additions and 24 deletions
|
@ -5,7 +5,6 @@ using LibHac.Fs;
|
|||
using LibHac.Ns;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.Exceptions;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||
using Ryujinx.HLE.HOS.Kernel.Memory;
|
||||
|
@ -55,7 +54,6 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
break;
|
||||
case LaunchParameterKind.Unknown:
|
||||
throw new NotImplementedException("Unknown LaunchParameterKind.");
|
||||
|
||||
default:
|
||||
return ResultCode.ObjectInvalid;
|
||||
}
|
||||
|
@ -95,8 +93,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
"No control file was found for this game. Using a dummy one instead. This may cause inaccuracies in some games.");
|
||||
}
|
||||
|
||||
Result result = EnsureApplicationSaveData(context.Device.FileSystem.FsClient, out long requiredSize, applicationId,
|
||||
ref control, ref userId);
|
||||
Result result = EnsureApplicationSaveData(context.Device.FileSystem.FsClient, out long requiredSize, applicationId, ref control, ref userId);
|
||||
|
||||
context.ResponseData.Write(requiredSize);
|
||||
|
||||
|
@ -113,7 +110,6 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
// TODO: When above calls are implemented, switch to using ns:am
|
||||
|
||||
long desiredLanguageCode = context.Device.System.State.DesiredLanguageCode;
|
||||
|
||||
int supportedLanguages = (int)context.Device.Application.ControlData.Value.SupportedLanguages;
|
||||
int firstSupported = BitOperations.TrailingZeroCount(supportedLanguages);
|
||||
|
||||
|
@ -168,6 +164,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
public ResultCode GetSaveDataSize(ServiceCtx context)
|
||||
{
|
||||
SaveDataType saveDataType = (SaveDataType)context.RequestData.ReadByte();
|
||||
|
||||
context.RequestData.BaseStream.Seek(7, System.IO.SeekOrigin.Current);
|
||||
|
||||
Uid userId = context.RequestData.ReadStruct<AccountUid>().ToLibHacUid();
|
||||
|
@ -307,13 +304,13 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
|
||||
private ResultCode InitializeApplicationCopyrightFrameBufferImpl(ulong transferMemoryAddress, ulong transferMemorySize, int width, int height)
|
||||
{
|
||||
ResultCode resultCode = ResultCode.ObjectInvalid;
|
||||
|
||||
if ((transferMemorySize & 0x3FFFF) != 0)
|
||||
{
|
||||
return ResultCode.InvalidParameters;
|
||||
}
|
||||
|
||||
ResultCode resultCode;
|
||||
|
||||
// if (_copyrightBuffer == null)
|
||||
{
|
||||
// TODO: Initialize buffer and object.
|
||||
|
@ -485,6 +482,20 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(141)] // 9.0.0+
|
||||
// TryPopFromFriendInvitationStorageChannel() -> object<nn::am::service::IStorage>
|
||||
public ResultCode TryPopFromFriendInvitationStorageChannel(ServiceCtx context)
|
||||
{
|
||||
// NOTE: IStorage are pushed in the channel with IApplicationAccessor PushToFriendInvitationStorageChannel
|
||||
// If _friendInvitationStorageChannelEvent is signaled, the event is cleared.
|
||||
// If an IStorage is available, returns it with ResultCode.Success.
|
||||
// If not, just returns ResultCode.NotAvailable. Since we don't support friend feature for now, it's fine to do the same.
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
|
||||
return ResultCode.NotAvailable;
|
||||
}
|
||||
|
||||
[Command(150)] // 9.0.0+
|
||||
// GetNotificationStorageChannelEvent() -> handle<copy>
|
||||
public ResultCode GetNotificationStorageChannelEvent(ServiceCtx context)
|
||||
|
|
Loading…
Reference in a new issue