2018-03-04 09:09:59 -08:00
|
|
|
|
using Ryujinx.Core.OsHle.Ipc;
|
2018-04-16 17:24:42 -07:00
|
|
|
|
using Ryujinx.Core.Settings;
|
2018-03-01 12:23:55 -08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2018-03-20 13:00:00 -07:00
|
|
|
|
namespace Ryujinx.Core.OsHle.Services.Set
|
2018-03-01 12:23:55 -08:00
|
|
|
|
{
|
2018-04-05 21:01:52 -07:00
|
|
|
|
class ISystemSettingsServer : IpcService
|
2018-03-01 12:23:55 -08:00
|
|
|
|
{
|
|
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
|
|
|
|
|
2018-03-19 11:58:46 -07:00
|
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-03-01 12:23:55 -08:00
|
|
|
|
|
2018-04-05 21:01:52 -07:00
|
|
|
|
public ISystemSettingsServer()
|
2018-03-01 12:23:55 -08:00
|
|
|
|
{
|
|
|
|
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
|
|
|
|
{
|
|
|
|
|
{ 23, GetColorSetId },
|
|
|
|
|
{ 24, SetColorSetId }
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static long GetColorSetId(ServiceCtx Context)
|
|
|
|
|
{
|
2018-03-03 09:04:58 -08:00
|
|
|
|
Context.ResponseData.Write((int)Context.Ns.Settings.ThemeColor);
|
|
|
|
|
|
2018-03-01 12:23:55 -08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static long SetColorSetId(ServiceCtx Context)
|
2018-04-05 21:01:52 -07:00
|
|
|
|
{
|
2018-04-16 17:24:42 -07:00
|
|
|
|
int ColorSetId = Context.RequestData.ReadInt32();
|
|
|
|
|
|
|
|
|
|
Context.Ns.Settings.ThemeColor = (ColorSet)ColorSetId;
|
2018-03-01 12:23:55 -08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|