From 012b85a4816ce9b1b6ef5f8a6f6cb147e295d1e9 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 15 Feb 2024 11:08:33 -0500 Subject: [PATCH] More structs --- src/Ryujinx.Horizon/Sdk/Am/AppletAttribute.cs | 11 +++++++ src/Ryujinx.Horizon/Sdk/Am/AppletId.cs | 30 +++++++++++++++++++ src/Ryujinx.Horizon/Sdk/Am/AppletMessage.cs | 2 +- .../Sdk/Am/AppletProcessLaunchReason.cs | 11 +++++++ .../Sdk/Am/LibraryAppletMode.cs | 11 +++++++ 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 src/Ryujinx.Horizon/Sdk/Am/AppletAttribute.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/AppletId.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/AppletProcessLaunchReason.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/LibraryAppletMode.cs diff --git a/src/Ryujinx.Horizon/Sdk/Am/AppletAttribute.cs b/src/Ryujinx.Horizon/Sdk/Am/AppletAttribute.cs new file mode 100644 index 000000000..b5d248818 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/AppletAttribute.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Am +{ + [StructLayout(LayoutKind.Sequential, Size = 0x80)] + public struct AppletAttribute + { + // TODO: Better way to rep single bit flag + public bool flag; + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/AppletId.cs b/src/Ryujinx.Horizon/Sdk/Am/AppletId.cs new file mode 100644 index 000000000..ea1d0bb5b --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/AppletId.cs @@ -0,0 +1,30 @@ +namespace Ryujinx.Horizon.Sdk.Am +{ + public enum AppletId + { + None = 0x00, + Application = 0x01, + OverlayApplet = 0x02, + QLaunch = 0x03, + Starter = 0x04, + Auth = 0x0A, + Cabinet = 0x0B, + Controller = 0x0C, + DataErase = 0x0F, + Error = 0x0E, + NetConnect = 0x0F, + PlayerSelect = 0x10, + Swkbd = 0x11, + MiiEdit = 0x12, + Web = 0x13, + Shop = 0x14, + PhotoViewer = 0x15, + Set = 0x16, + OfflineWeb = 0x17, + LoginShare = 0x18, + WifiWebAuth = 0x19, + MyPage = 0x1A, + Gift = 0x1B, + UserMigration = 0x1C, + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/AppletMessage.cs b/src/Ryujinx.Horizon/Sdk/Am/AppletMessage.cs index 7d88b72fa..7718b7cac 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/AppletMessage.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/AppletMessage.cs @@ -1,6 +1,6 @@ namespace Ryujinx.Horizon.Sdk.Am { - public enum AppletMessage : byte + public enum AppletMessage { None = 0, ChangeIntoForeground = 1, diff --git a/src/Ryujinx.Horizon/Sdk/Am/AppletProcessLaunchReason.cs b/src/Ryujinx.Horizon/Sdk/Am/AppletProcessLaunchReason.cs new file mode 100644 index 000000000..24e7ac180 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/AppletProcessLaunchReason.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Am +{ + [StructLayout(LayoutKind.Sequential, Size = 0x4)] + public struct AppletProcessLaunchReason + { + // TODO: Better way to rep single bit flag + public bool flag; + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/LibraryAppletMode.cs b/src/Ryujinx.Horizon/Sdk/Am/LibraryAppletMode.cs new file mode 100644 index 000000000..9c2423bb5 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/LibraryAppletMode.cs @@ -0,0 +1,11 @@ +namespace Ryujinx.Horizon.Sdk.Am +{ + public enum LibraryAppletMode : uint + { + AllForeground, + PartialForeground, + NoUi, + PartialForegroundWithIndirectDisplay, + AllForegroundInitiallyHidden + } +}