Resolve nits

This commit is contained in:
jduncanator 2019-11-02 00:06:16 +11:00
parent e4a0dc42fc
commit 9182c4c806
5 changed files with 39 additions and 31 deletions

View file

@ -2,26 +2,26 @@
{
enum AppletId
{
Application = 0x01,
OverlayDisplay = 0x02,
QLaunch = 0x03,
Starter = 0x04,
Auth = 0x0A,
Cabinet = 0x0B,
Controller = 0x0C,
DataErase = 0x0D,
Error = 0x0E,
NetConnect = 0x0F,
PlayerSelect = 0x10,
SoftwareKeyboard = 0x11,
MiiEdit = 0x12,
LibAppletWeb = 0x13,
LibAppletShop = 0x14,
PhotoViewer = 0x15,
Settings = 0x16,
LibAppletOff = 0x17,
Application = 0x01,
OverlayDisplay = 0x02,
QLaunch = 0x03,
Starter = 0x04,
Auth = 0x0A,
Cabinet = 0x0B,
Controller = 0x0C,
DataErase = 0x0D,
Error = 0x0E,
NetConnect = 0x0F,
PlayerSelect = 0x10,
SoftwareKeyboard = 0x11,
MiiEdit = 0x12,
LibAppletWeb = 0x13,
LibAppletShop = 0x14,
PhotoViewer = 0x15,
Settings = 0x16,
LibAppletOff = 0x17,
LibAppletWhitelisted = 0x18,
LibAppletAuth = 0x19,
MyPage = 0x1A
LibAppletAuth = 0x19,
MyPage = 0x1A
}
}

View file

@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Applets
return (IApplet)Activator.CreateInstance(appletClass, system);
}
return new StubApplet();
throw new NotImplementedException($"{applet} applet is not implemented.");
}
}
}

View file

@ -1,4 +1,5 @@
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using System;
using System.Collections.Generic;
using System.IO;
@ -7,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Applets
{
internal class PlayerSelect : IApplet
{
private Horizon _system;
private Horizon _system;
private Queue<IStorage> _inputStack;
private Queue<IStorage> _outputStack;
@ -57,14 +58,13 @@ namespace Ryujinx.HLE.HOS.Applets
private byte[] BuildResponse()
{
var currentUser = _system.State.Account.LastOpenedUser;
UserProfile currentUser = _system.State.Account.LastOpenedUser;
using (var ms = new MemoryStream())
using (MemoryStream ms = new MemoryStream())
{
var writer = new BinaryWriter(ms);
BinaryWriter writer = new BinaryWriter(ms);
// Result (0 = Success, 2 = Failure)
writer.Write(0UL);
writer.Write((ulong)PlayerSelectResult.Success);
// UserID Low (long) High (long)
currentUser.UserId.Write(writer);

View file

@ -0,0 +1,8 @@
namespace Ryujinx.HLE.HOS.Applets
{
enum PlayerSelectResult : ulong
{
Success = 0,
Failure = 2
}
}

View file

@ -69,14 +69,14 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
// PopOutData() -> object<nn::am::service::IStorage>
public ResultCode PopOutData(ServiceCtx context)
{
var result = _applet.PopOutData(out IStorage storage);
ResultCode result = (ResultCode)_applet.PopOutData(out IStorage storage);
if(storage != null)
if (result == ResultCode.Success && storage != null)
{
MakeObject(context, storage);
}
return (ResultCode)result;
return result;
}
}
}