Migrate friends service to new IPC (#6174)

* Migrate friends service to new IPC

* Add a note that the pointer buffer size and domain counts are wrong

* Wrong length

* Format whitespace

* PR feedback

* Fill in structs from PR feedback

* Missed that one

* Somehow forgot to save that one

* Fill in enums from PR review

* Language enum, NotificationTime

* Format whitespace

* Fix the warning
This commit is contained in:
gdkchan
2024-01-29 18:45:40 -03:00
committed by GitHub
parent 20a392ad55
commit 4117c13377
148 changed files with 3026 additions and 832 deletions

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings
{
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x1)]
struct BatteryLot
{
}
}

View File

@@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x2)]
struct AccelerometerOffset
{
public ushort X;
public ushort Y;
public ushort Z;
}
}

View File

@@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x2)]
struct AccelerometerScale
{
public ushort X;
public ushort Y;
public ushort Z;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x74, Pack = 0x4)]
struct AmiiboEcdsaCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x24, Pack = 0x4)]
struct AmiiboEcqvBlsCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x48, Pack = 0x4)]
struct AmiiboEcqvBlsKey
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x94, Pack = 0x4)]
struct AmiiboEcqvBlsRootCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x4)]
struct AmiiboEcqvCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x58, Pack = 0x4)]
struct AmiiboKey
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x9, Pack = 0x1)]
struct AnalogStickFactoryCalibration
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x12, Pack = 0x1)]
struct AnalogStickModelParameter
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x1)]
struct BdAddress
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x1E, Pack = 0x1)]
struct ConfigurationId1
{
}
}

View File

@@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x2)]
struct ConsoleSixAxisSensorHorizontalOffset
{
public ushort X;
public ushort Y;
public ushort Z;
}
}

View File

@@ -0,0 +1,8 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
struct CountryCode
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x180)]
struct EccB233DeviceCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x58, Pack = 0x4)]
struct EccB233DeviceKey
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x400)]
struct GameCardCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x138)]
struct GameCardKey
{
}
}

View File

@@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x2)]
struct GyroscopeOffset
{
public ushort X;
public ushort Y;
public ushort Z;
}
}

View File

@@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x2)]
struct GyroscopeScale
{
public ushort X;
public ushort Y;
public ushort Z;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x6, Pack = 0x1)]
struct MacAddress
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x240)]
struct Rsa2048DeviceCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x248)]
struct Rsa2048DeviceKey
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x1)]
struct SerialNumber
{
}
}

View File

@@ -0,0 +1,32 @@
using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x5A, Pack = 0x2)]
struct SpeakerParameter
{
public ushort Version;
public Array34<byte> Reserved;
public ushort SpeakerHpf2A1;
public ushort SpeakerHpf2A2;
public ushort SpeakerHpf2H0;
public ushort SpeakerEqInputVolume;
public ushort SpeakerEqOutputVolume;
public ushort SpeakerEqCtrl1;
public ushort SpeakerEqCtrl2;
public ushort SpeakerDrcAgcCtrl2;
public ushort SpeakerDrcAgcCtrl3;
public ushort SpeakerDrcAgcCtrl1;
public ushort SpeakerAnalogVolume;
public ushort HeadphoneAnalogVolume;
public ushort SpeakerDigitalVolumeMin;
public ushort SpeakerDigitalVolumeMax;
public ushort HeadphoneDigitalVolumeMin;
public ushort HeadphoneDigitalVolumeMax;
public ushort MicFixedGain;
public ushort MicVariableVolumeMin;
public ushort MicVariableVolumeMax;
public Array16<byte> Reserved2;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x804)]
struct SslCertificate
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.Factory
{
[StructLayout(LayoutKind.Sequential, Size = 0x138)]
struct SslKey
{
}
}

View File

@@ -0,0 +1,24 @@
namespace Ryujinx.Horizon.Sdk.Settings
{
enum Language : uint
{
Japanese,
AmericanEnglish,
French,
German,
Italian,
Spanish,
Chinese,
Korean,
Dutch,
Portuguese,
Russian,
Taiwanese,
BritishEnglish,
CanadianFrench,
LatinAmericanSpanish,
SimplifiedChinese,
TraditionalChinese,
BrazilianPortuguese,
}
}

View File

@@ -0,0 +1,63 @@
using Ryujinx.Common.Memory;
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Ryujinx.Horizon.Sdk.Settings
{
[StructLayout(LayoutKind.Sequential, Size = 0x8, Pack = 0x1)]
struct LanguageCode
{
private static readonly string[] _languageCodes = new string[]
{
"ja",
"en-US",
"fr",
"de",
"it",
"es",
"zh-CN",
"ko",
"nl",
"pt",
"ru",
"zh-TW",
"en-GB",
"fr-CA",
"es-419",
"zh-Hans",
"zh-Hant",
"pt-BR"
};
public Array8<byte> Value;
public bool IsValid()
{
int length = Value.AsSpan().IndexOf((byte)0);
if (length < 0)
{
return false;
}
string str = Encoding.ASCII.GetString(Value.AsSpan()[..length]);
return _languageCodes.AsSpan().Contains(str);
}
public LanguageCode(Language language)
{
if ((uint)language >= _languageCodes.Length)
{
throw new ArgumentOutOfRangeException(nameof(language));
}
Value = new LanguageCode(_languageCodes[(int)language]).Value;
}
public LanguageCode(string strCode)
{
Encoding.ASCII.GetBytes(strCode, Value.AsSpan());
}
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings
{
[StructLayout(LayoutKind.Sequential, Size = 0x48)]
struct SettingsItemKey
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings
{
[StructLayout(LayoutKind.Sequential, Size = 0x48)]
struct SettingsName
{
}
}

View File

@@ -0,0 +1,15 @@
using Ryujinx.Horizon.Sdk.Account;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct AccountNotificationSettings
{
#pragma warning disable CS0649 // Field is never assigned to
public Uid UserId;
public uint Flags;
public byte FriendPresenceOverlayPermission;
public byte FriendInvitationOverlayPermission;
public ushort Reserved;
#pragma warning restore CS0649
}
}

View File

@@ -0,0 +1,6 @@
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct AccountOnlineStorageSettings
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x4, Pack = 0x4)]
struct AccountSettings
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x100)]
struct AllowedSslHost
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 0x4)]
struct AnalogStickUserCalibration
{
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum AppletLaunchFlag : uint
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x8, Pack = 0x4)]
struct AudioVolume
{
}
}

View File

@@ -0,0 +1,22 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x28, Pack = 0x4)]
struct BacklightSettings
{
// TODO: Determine field names.
public uint Unknown0x00;
public float Unknown0x04;
// 1st group
public float Unknown0x08;
public float Unknown0x0C;
public float Unknown0x10;
// 2nd group
public float Unknown0x14;
public float Unknown0x18;
public float Unknown0x1C;
public float Unknown0x20;
public float Unknown0x24;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x2C, Pack = 0x4)]
struct BacklightSettingsEx
{
}
}

View File

@@ -0,0 +1,6 @@
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct BlePairingSettings
{
}
}

View File

@@ -0,0 +1,29 @@
using Ryujinx.Common.Memory;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct BluetoothDevicesSettings
{
#pragma warning disable CS0649 // Field is never assigned to
public Array6<byte> BdAddr;
public Array32<byte> DeviceName;
public Array3<byte> ClassOfDevice;
public Array16<byte> LinkKey;
public bool LinkKeyPresent;
public ushort Version;
public uint TrustedServices;
public ushort Vid;
public ushort Pid;
public byte SubClass;
public byte AttributeMask;
public ushort DescriptorLength;
public Array128<byte> Descriptor;
public byte KeyType;
public byte DeviceType;
public ushort BrrSize;
public Array9<byte> Brr;
public Array256<byte> Reserved;
public Array43<byte> Reserved2;
#pragma warning restore CS0649
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x5C8)]
struct ButtonConfigRegisteredSettings
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x5A8)]
struct ButtonConfigSettings
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0xC, Pack = 0x4)]
struct ConsoleSixAxisSensorAccelerationBias
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x24, Pack = 0x4)]
struct ConsoleSixAxisSensorAccelerationGain
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x24, Pack = 0x4)]
struct ConsoleSixAxisSensorAngularAcceleration
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0xC, Pack = 0x4)]
struct ConsoleSixAxisSensorAngularVelocityBias
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x24, Pack = 0x4)]
struct ConsoleSixAxisSensorAngularVelocityGain
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0xC, Pack = 0x4)]
struct ConsoleSixAxisSensorAngularVelocityTimeBias
{
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum DataDeletionFlag : uint
{
AutomaticDeletionFlag = 1 << 0,
}
[StructLayout(LayoutKind.Sequential, Size = 0x8, Pack = 0x4)]
struct DataDeletionSettings
{
public DataDeletionFlag Flags;
public uint UseCount;
}
}

View File

@@ -0,0 +1,25 @@
using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;
using System.Text;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x80)]
struct DeviceNickName
{
public Array128<byte> Value;
public DeviceNickName(string value)
{
int bytesWritten = Encoding.ASCII.GetBytes(value, Value.AsSpan());
if (bytesWritten < 128)
{
Value[bytesWritten] = 0;
}
else
{
Value[127] = 0;
}
}
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x200)]
struct Edid
{
}
}

View File

@@ -0,0 +1,6 @@
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct EulaVersion
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 0x8)]
struct FatalDirtyFlag
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x100)]
struct FirmwareVersion
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x40, Pack = 0x1)]
struct FirmwareVersionDigest
{
}
}

View File

@@ -0,0 +1,14 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x14, Pack = 0x1)]
struct HomeMenuScheme
{
public uint Main;
public uint Back;
public uint Sub;
public uint Bezel;
public uint Extra;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x100)]
struct HostFsMountPoint
{
}
}

View File

@@ -0,0 +1,14 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x20, Pack = 0x8)]
struct InitialLaunchSettings
{
public uint Flags;
public uint Reserved;
public ulong TimeStamp1;
public ulong TimeStamp2;
public ulong TimeStamp3;
}
}

View File

@@ -0,0 +1,6 @@
namespace Ryujinx.Horizon.Sdk.Settings.System
{
struct NetworkSettings
{
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum NotificationFlag : uint
{
RingtoneFlag = 1 << 0,
DownloadCompletionFlag = 1 << 1,
EnablesNews = 1 << 8,
IncomingLampFlag = 1 << 9,
}
enum NotificationVolume : uint
{
Mute,
Low,
High,
}
struct NotificationTime
{
#pragma warning disable CS0649 // Field is never assigned to
public uint Hour;
public uint Minute;
#pragma warning restore CS0649
}
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x4)]
struct NotificationSettings
{
public NotificationFlag Flag;
public NotificationVolume Volume;
public NotificationTime HeadTime;
public NotificationTime TailTime;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x29)]
struct NxControllerLegacySettings
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x42C)]
struct NxControllerSettings
{
}
}

View File

@@ -0,0 +1,20 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x4)]
struct PtmFuelGaugeParameter
{
public ushort Rcomp0;
public ushort TempCo;
public ushort FullCap;
public ushort FullCapNom;
public ushort IavgEmpty;
public ushort QrTable00;
public ushort QrTable10;
public ushort QrTable20;
public ushort QrTable30;
public ushort Reserved;
public uint Cycles;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x40, Pack = 0x4)]
struct RebootlessSystemUpdateVersion
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x18, Pack = 0x1)]
struct SerialNumber
{
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum ServiceDiscoveryControlSettings : uint
{
IsChangeEnvironmentIdentifierDisabled = 1 << 0,
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum SleepFlag : uint
{
SleepsWhilePlayingMedia = 1 << 0,
WakesAtPowerStateChange = 1 << 1,
}
enum HandheldSleepPlan : uint
{
At1Min,
At3Min,
At5Min,
At10Min,
At30Min,
Never,
}
enum ConsoleSleepPlan : uint
{
At1Hour,
At2Hour,
At3Hour,
At6Hour,
At12Hour,
Never,
}
[StructLayout(LayoutKind.Sequential, Size = 0xC, Pack = 0x4)]
struct SleepSettings
{
public SleepFlag Flags;
public HandheldSleepPlan HandheldSleepPlan;
public ConsoleSleepPlan ConsoleSleepPlan;
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x10, Pack = 0x8)]
struct TelemetryDirtyFlag
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x80, Pack = 0x8)]
struct ThemeId
{
}
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[StructLayout(LayoutKind.Sequential, Size = 0x8, Pack = 0x8)]
struct ThemeSettings
{
}
}

View File

@@ -0,0 +1,59 @@
using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Horizon.Sdk.Settings.System
{
[Flags]
enum TvFlag : uint
{
Allows4k = 1 << 0,
Allows3d = 1 << 1,
AllowsCec = 1 << 2,
PreventsScreenBurnIn = 1 << 3,
}
enum TvResolution : uint
{
Auto,
At1080p,
At720p,
At480p,
}
enum HdmiContentType : uint
{
None,
Graphics,
Cinema,
Photo,
Game,
}
enum RgbRange : uint
{
Auto,
Full,
Limited,
}
enum CmuMode : uint
{
None,
ColorInvert,
HighContrast,
GrayScale,
}
[StructLayout(LayoutKind.Sequential, Size = 0x20, Pack = 0x4)]
struct TvSettings
{
public TvFlag Flags;
public TvResolution TvResolution;
public HdmiContentType HdmiContentType;
public RgbRange RgbRange;
public CmuMode CmuMode;
public float TvUnderscan;
public float TvGamma;
public float ContrastRatio;
}
}