Better support for user accounts (#349)

* Better support for user accounts

* Nits

* Check for invalid ids
This commit is contained in:
gdkchan 2018-08-14 19:02:42 -03:00 committed by GitHub
parent 17f54b5d78
commit 9ac5583513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 314 additions and 136 deletions

View file

@ -1,5 +1,5 @@
using Ryujinx.HLE.OsHle.Ipc;
using Ryujinx.HLE.Settings;
using Ryujinx.HLE.OsHle.SystemState;
using System;
using System.Collections.Generic;
using System.IO;
@ -75,7 +75,7 @@ namespace Ryujinx.HLE.OsHle.Services.Set
public static long GetColorSetId(ServiceCtx Context)
{
Context.ResponseData.Write((int)Context.Ns.Settings.ThemeColor);
Context.ResponseData.Write((int)Context.Ns.Os.SystemState.ThemeColor);
return 0;
}
@ -84,7 +84,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set
{
int ColorSetId = Context.RequestData.ReadInt32();
Context.Ns.Settings.ThemeColor = (ColorSet)ColorSetId;
Context.Ns.Os.SystemState.ThemeColor = (ColorSet)ColorSetId;
return 0;
}
@ -121,6 +122,7 @@ namespace Ryujinx.HLE.OsHle.Services.Set
SettingBuffer = Encoding.ASCII.GetBytes(StringValue + "\0");
}
}
if (NxSetting is int IntValue)
{
SettingBuffer = BitConverter.GetBytes(IntValue);