From b093a3fbf6c5e19307f19bbc4efd5e5b68e4c9a7 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 10 Mar 2024 13:51:30 +0000 Subject: [PATCH] Move Applets to Horizon --- .../UI/Applet/GtkHostUIHandler.cs | 5 ++-- .../UI/Applet/SwkbdAppletDialog.cs | 2 +- src/Ryujinx.HLE/HOS/Horizon.cs | 2 +- .../QueryPlayStatisticsManager.cs | 3 +- .../RootService/IApplicationDisplayService.cs | 2 +- .../HOS/SystemState/AppletStateMgr.cs | 2 +- src/Ryujinx.HLE/HOS/UserChannelPersistence.cs | 3 +- src/Ryujinx.HLE/Ryujinx.HLE.csproj | 6 ---- src/Ryujinx.HLE/UI/IHostUIHandler.cs | 5 ++-- src/Ryujinx.Headless.SDL2/WindowBase.cs | 5 ++-- .../Ipc/Controllers/LibraryAppletCreator.cs | 21 ++++++++------ .../Applets/AppletManager.cs | 23 ++++++++------- .../Applets/Browser/BootDisplayKind.cs | 2 +- .../Applets/Browser/BrowserApplet.cs | 15 +++++----- .../Applets/Browser/BrowserArgument.cs | 4 +-- .../Applets/Browser/BrowserOutput.cs | 2 +- .../Applets/Browser/BrowserOutputType.cs | 2 +- .../Applets/Browser/DocumentKind.cs | 2 +- .../Applets/Browser/LeftStickMode.cs | 2 +- .../Applets/Browser/ShimKind.cs | 2 +- .../Applets/Browser/WebArgHeader.cs | 2 +- .../Applets/Browser/WebArgTLV.cs | 2 +- .../Applets/Browser/WebArgTLVType.cs | 2 +- .../Applets/Browser/WebCommonReturnValue.cs | 2 +- .../Applets/Browser/WebExitReason.cs | 2 +- .../Applets/CommonArguments.cs | 2 +- .../Applets/Controller/ControllerApplet.cs | 27 +++++++----------- .../Controller/ControllerAppletUIArgs.cs | 3 +- .../Controller/ControllerSupportArgHeader.cs | 2 +- .../Controller/ControllerSupportArgPrivate.cs | 2 +- .../Controller/ControllerSupportArgV7.cs | 2 +- .../Controller/ControllerSupportArgVPre7.cs | 2 +- .../Controller/ControllerSupportMode.cs | 2 +- .../Controller/ControllerSupportResultInfo.cs | 2 +- .../Applets/Error/ApplicationErrorArg.cs | 2 +- .../Applets/Error/ErrorApplet.cs | 14 ++++----- .../Applets/Error/ErrorCommonArg.cs | 2 +- .../Applets/Error/ErrorCommonHeader.cs | 2 +- .../Applets/Error/ErrorType.cs | 2 +- .../Applets/IApplet.cs | 14 ++++----- .../PlayerSelect/PlayerSelectApplet.cs | 21 +++++--------- .../PlayerSelect/PlayerSelectResult.cs | 2 +- .../CJKCharacterValidation.cs | 2 +- .../SoftwareKeyboard/InitialCursorPosition.cs | 2 +- .../SoftwareKeyboard/InlineKeyboardRequest.cs | 2 +- .../InlineKeyboardResponse.cs | 2 +- .../SoftwareKeyboard/InlineKeyboardState.cs | 2 +- .../SoftwareKeyboard/InlineResponses.cs | 2 +- .../Applets/SoftwareKeyboard/InputFormMode.cs | 2 +- .../SoftwareKeyboard/InvalidButtonFlags.cs | 2 +- .../SoftwareKeyboard/InvalidCharFlags.cs | 2 +- .../SoftwareKeyboard/KeyboardCalcFlags.cs | 2 +- .../SoftwareKeyboard/KeyboardInputMode.cs | 2 +- .../KeyboardMiniaturizationMode.cs | 2 +- .../Applets/SoftwareKeyboard/KeyboardMode.cs | 2 +- .../SoftwareKeyboard/KeyboardResult.cs | 2 +- .../NumericCharacterValidation.cs | 2 +- .../Applets/SoftwareKeyboard/PasswordMode.cs | 2 +- .../SoftwareKeyboard/Resources/Icon_BtnA.png | Bin .../SoftwareKeyboard/Resources/Icon_BtnA.svg | 0 .../SoftwareKeyboard/Resources/Icon_BtnB.png | Bin .../SoftwareKeyboard/Resources/Icon_BtnB.svg | 0 .../SoftwareKeyboard/Resources/Icon_KeyF6.png | Bin .../SoftwareKeyboard/Resources/Icon_KeyF6.svg | 0 .../Resources/Logo_Ryujinx.png | Bin .../SoftwareKeyboardAppear.cs | 2 +- .../SoftwareKeyboardAppearEx.cs | 2 +- .../SoftwareKeyboardApplet.cs | 21 ++++++-------- .../SoftwareKeyboard/SoftwareKeyboardCalc.cs | 2 +- .../SoftwareKeyboardCalcEx.cs | 2 +- .../SoftwareKeyboardConfig.cs | 2 +- .../SoftwareKeyboardCustomizeDic.cs | 2 +- .../SoftwareKeyboardDictSet.cs | 2 +- .../SoftwareKeyboardInitialize.cs | 2 +- .../SoftwareKeyboardRenderer.cs | 3 +- .../SoftwareKeyboardRendererBase.cs | 3 +- .../SoftwareKeyboard/SoftwareKeyboardState.cs | 2 +- .../SoftwareKeyboardUIArgs.cs | 4 +-- .../SoftwareKeyboardUIState.cs | 4 +-- .../SoftwareKeyboardUserWord.cs | 2 +- .../Applets/SoftwareKeyboard/TRef.cs | 2 +- .../Applets/SoftwareKeyboard/TimedAction.cs | 2 +- src/Ryujinx.Horizon/Ryujinx.Horizon.csproj | 9 ++++++ .../Am/Controllers/ILibraryAppletCreator.cs | 8 +++--- .../Sdk/Am}/Types/AppletMessage.cs | 5 ++-- .../Sdk/Am/Types/FocusState.cs | 8 ++++++ .../Sdk/Am}/Types/ProgramSpecifyKind.cs | 2 +- src/Ryujinx.Horizon/ServiceTable.cs | 1 - .../{HLE => Horizon}/SoftwareKeyboardTests.cs | 4 +-- src/Ryujinx.Tests/Ryujinx.Tests.csproj | 1 + src/Ryujinx/UI/Applet/AvaHostUIHandler.cs | 5 ++-- .../UI/Applet/ControllerAppletDialog.axaml.cs | 2 +- .../UI/Applet/SwkbdAppletDialog.axaml.cs | 3 +- 93 files changed, 181 insertions(+), 181 deletions(-) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/AppletManager.cs (58%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/BootDisplayKind.cs (73%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/BrowserApplet.cs (89%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/BrowserArgument.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/BrowserOutput.cs (96%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/BrowserOutputType.cs (87%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/DocumentKind.cs (75%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/LeftStickMode.cs (64%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/ShimKind.cs (78%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/WebArgHeader.cs (77%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/WebArgTLV.cs (75%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/WebArgTLVType.cs (97%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/WebCommonReturnValue.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Browser/WebExitReason.cs (78%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/CommonArguments.cs (91%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerApplet.cs (89%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerAppletUIArgs.cs (80%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportArgHeader.cs (92%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportArgPrivate.cs (90%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportArgV7.cs (94%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportArgVPre7.cs (94%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportMode.cs (78%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Controller/ControllerSupportResultInfo.cs (89%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Error/ApplicationErrorArg.cs (88%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Error/ErrorApplet.cs (96%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Error/ErrorCommonArg.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Error/ErrorCommonHeader.cs (90%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/Error/ErrorType.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/IApplet.cs (62%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/PlayerSelect/PlayerSelectApplet.cs (70%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/PlayerSelect/PlayerSelectResult.cs (66%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/CJKCharacterValidation.cs (92%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InitialCursorPosition.cs (88%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs (96%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InlineKeyboardState.cs (95%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InlineResponses.cs (99%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InputFormMode.cs (88%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InvalidButtonFlags.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/InvalidCharFlags.cs (96%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs (92%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/KeyboardInputMode.cs (87%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs (81%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/KeyboardMode.cs (94%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/KeyboardResult.cs (81%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/NumericCharacterValidation.cs (87%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/PasswordMode.cs (87%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_BtnA.png (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_BtnA.svg (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_BtnB.png (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_BtnB.svg (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.png (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.svg (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/Resources/Logo_Ryujinx.png (100%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs (99%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs (99%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs (94%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs (93%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs (98%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs (99%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs (92%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs (80%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs (87%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs (84%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/TRef.cs (90%) rename src/{Ryujinx.HLE/HOS => Ryujinx.Horizon}/Applets/SoftwareKeyboard/TimedAction.cs (99%) rename src/{Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy => Ryujinx.Horizon/Sdk/Am}/Types/AppletMessage.cs (90%) create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs rename src/{Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy => Ryujinx.Horizon/Sdk/Am}/Types/ProgramSpecifyKind.cs (59%) rename src/Ryujinx.Tests/{HLE => Horizon}/SoftwareKeyboardTests.cs (96%) diff --git a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs index 1d918d21b..99d883b9d 100644 --- a/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs +++ b/src/Ryujinx.Gtk3/UI/Applet/GtkHostUIHandler.cs @@ -1,7 +1,8 @@ using Gtk; -using Ryujinx.HLE.HOS.Applets; -using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; using Ryujinx.HLE.UI; +using Ryujinx.Horizon.Applets.Controller; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Sdk.Am.Types; using Ryujinx.UI.Widgets; using System; using System.Threading; diff --git a/src/Ryujinx.Gtk3/UI/Applet/SwkbdAppletDialog.cs b/src/Ryujinx.Gtk3/UI/Applet/SwkbdAppletDialog.cs index 8045da91e..9f6074d5a 100644 --- a/src/Ryujinx.Gtk3/UI/Applet/SwkbdAppletDialog.cs +++ b/src/Ryujinx.Gtk3/UI/Applet/SwkbdAppletDialog.cs @@ -1,5 +1,5 @@ using Gtk; -using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; using System; using System.Linq; diff --git a/src/Ryujinx.HLE/HOS/Horizon.cs b/src/Ryujinx.HLE/HOS/Horizon.cs index 64b08e309..ebaa9e2e5 100644 --- a/src/Ryujinx.HLE/HOS/Horizon.cs +++ b/src/Ryujinx.HLE/HOS/Horizon.cs @@ -12,7 +12,6 @@ using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services; using Ryujinx.HLE.HOS.Services.Account.Acc; -using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; using Ryujinx.HLE.HOS.Services.Apm; using Ryujinx.HLE.HOS.Services.Caps; using Ryujinx.HLE.HOS.Services.Mii; @@ -29,6 +28,7 @@ using Ryujinx.HLE.HOS.SystemState; using Ryujinx.HLE.Loaders.Executables; using Ryujinx.HLE.Loaders.Processes; using Ryujinx.Horizon; +using Ryujinx.Horizon.Sdk.Am.Types; using System; using System.Collections.Generic; using System.IO; diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs index 56d389cd2..d8f3bd125 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs @@ -47,7 +47,8 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService { if (!context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryableApplicationId.ItemsRo.Contains(titleId)) { - return (ResultCode)Am.ResultCode.ObjectInvalid; + // Am Result.ObjectInvalid + return (ResultCode)((500 << 9) | 128); } } } diff --git a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs index b6988f08d..c01adde83 100644 --- a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs @@ -1,7 +1,7 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Applets; +using Ryujinx.Horizon.Applets; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Services.SurfaceFlinger; using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService; diff --git a/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs b/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs index a2837e207..9bfb86b81 100644 --- a/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs +++ b/src/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs @@ -1,5 +1,5 @@ using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; +using Ryujinx.Horizon.Sdk.Am.Types; using System.Collections.Concurrent; namespace Ryujinx.HLE.HOS.SystemState diff --git a/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs b/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs index 64e5ee4b9..933fccbe9 100644 --- a/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs +++ b/src/Ryujinx.HLE/HOS/UserChannelPersistence.cs @@ -1,4 +1,5 @@ -using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.Sdk.Am.Types; using System; using System.Collections.Generic; diff --git a/src/Ryujinx.HLE/Ryujinx.HLE.csproj b/src/Ryujinx.HLE/Ryujinx.HLE.csproj index 0fcf9e4b5..856833d61 100644 --- a/src/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/src/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -24,8 +24,6 @@ - - @@ -40,10 +38,6 @@ - - - - diff --git a/src/Ryujinx.HLE/UI/IHostUIHandler.cs b/src/Ryujinx.HLE/UI/IHostUIHandler.cs index 3b3a430ee..f58400701 100644 --- a/src/Ryujinx.HLE/UI/IHostUIHandler.cs +++ b/src/Ryujinx.HLE/UI/IHostUIHandler.cs @@ -1,5 +1,6 @@ -using Ryujinx.HLE.HOS.Applets; -using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; +using Ryujinx.Horizon.Applets.Controller; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Sdk.Am.Types; namespace Ryujinx.HLE.UI { diff --git a/src/Ryujinx.Headless.SDL2/WindowBase.cs b/src/Ryujinx.Headless.SDL2/WindowBase.cs index 8768913f5..d97b4857e 100644 --- a/src/Ryujinx.Headless.SDL2/WindowBase.cs +++ b/src/Ryujinx.Headless.SDL2/WindowBase.cs @@ -5,9 +5,10 @@ using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.GAL.Multithreading; using Ryujinx.Graphics.Gpu; using Ryujinx.Graphics.OpenGL; -using Ryujinx.HLE.HOS.Applets; -using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; using Ryujinx.HLE.UI; +using Ryujinx.Horizon.Applets.Controller; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Sdk.Am.Types; using Ryujinx.Input; using Ryujinx.Input.HLE; using Ryujinx.SDL2.Common; diff --git a/src/Ryujinx.Horizon/Am/Ipc/Controllers/LibraryAppletCreator.cs b/src/Ryujinx.Horizon/Am/Ipc/Controllers/LibraryAppletCreator.cs index ca66d47af..d72b02372 100644 --- a/src/Ryujinx.Horizon/Am/Ipc/Controllers/LibraryAppletCreator.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/Controllers/LibraryAppletCreator.cs @@ -1,23 +1,25 @@ using Ryujinx.Common.Logging; using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using Ryujinx.Horizon.Sdk.Am.Controllers; using Ryujinx.Horizon.Sdk.Am.Storage; using Ryujinx.Horizon.Sdk.Sf; +using System.Linq; namespace Ryujinx.Horizon.Am.Ipc.Controllers { partial class LibraryAppletCreator : ILibraryAppletCreator { [CmifCommand(0)] - public Result CreateLibraryApplet(out ILibraryAppletAccessor arg0, uint arg1, uint arg2) + public Result CreateLibraryApplet(out ILibraryAppletAccessor libraryAppletAccessor, uint appletId, uint libraryAppletMode) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + libraryAppletAccessor = new LibraryAppletAccessor((AppletId)appletId); return Result.Success; } [CmifCommand(1)] - public Result TerminateAllLibraryApplets(out bool arg0) + public Result TerminateAllLibraryApplets() { Logger.Stub?.PrintStub(LogClass.ServiceAm); @@ -25,32 +27,35 @@ namespace Ryujinx.Horizon.Am.Ipc.Controllers } [CmifCommand(2)] - public Result AreAnyLibraryAppletsLeft() + public Result AreAnyLibraryAppletsLeft(out bool arg0) { + arg0 = true; Logger.Stub?.PrintStub(LogClass.ServiceAm); return Result.Success; } [CmifCommand(10)] - public Result CreateStorage(out IStorage arg0, long arg1) + public Result CreateStorage(out IStorage storage, long size) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + storage = new Storage.Storage(Enumerable.Repeat((byte)0, (int)size).ToArray()); return Result.Success; } [CmifCommand(11)] - public Result CreateTransferMemoryStorage(out IStorage arg0, int arg1, long arg2, bool arg3) + public Result CreateTransferMemoryStorage(out IStorage storage, int handle, long size, bool writeable) { + storage = new Storage.Storage(Enumerable.Repeat((byte)0, (int)size).ToArray(), writeable); Logger.Stub?.PrintStub(LogClass.ServiceAm); return Result.Success; } [CmifCommand(12)] - public Result CreateHandleStorage(out IStorage arg0, int arg1, long arg2) + public Result CreateHandleStorage(out IStorage storage, int handle, long size) { + storage = new Storage.Storage(Enumerable.Repeat((byte)0, (int)size).ToArray()); Logger.Stub?.PrintStub(LogClass.ServiceAm); return Result.Success; diff --git a/src/Ryujinx.HLE/HOS/Applets/AppletManager.cs b/src/Ryujinx.Horizon/Applets/AppletManager.cs similarity index 58% rename from src/Ryujinx.HLE/HOS/Applets/AppletManager.cs rename to src/Ryujinx.Horizon/Applets/AppletManager.cs index 30300f1b6..ae7ec316e 100644 --- a/src/Ryujinx.HLE/HOS/Applets/AppletManager.cs +++ b/src/Ryujinx.Horizon/Applets/AppletManager.cs @@ -1,10 +1,13 @@ -using Ryujinx.HLE.HOS.Applets.Browser; -using Ryujinx.HLE.HOS.Applets.Error; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; +using Ryujinx.Horizon.Applets.Browser; +using Ryujinx.Horizon.Applets.Controller; +using Ryujinx.Horizon.Applets.PlayerSelect; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Sdk.Am; using System; using System.Collections.Generic; +using ErrorApplet = Ryujinx.Horizon.Applets.Error.ErrorApplet; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets { static class AppletManager { @@ -17,18 +20,18 @@ namespace Ryujinx.HLE.HOS.Applets { AppletId.Error, typeof(ErrorApplet) }, { AppletId.PlayerSelect, typeof(PlayerSelectApplet) }, { AppletId.Controller, typeof(ControllerApplet) }, - { AppletId.SoftwareKeyboard, typeof(SoftwareKeyboardApplet) }, - { AppletId.LibAppletWeb, typeof(BrowserApplet) }, - { AppletId.LibAppletShop, typeof(BrowserApplet) }, - { AppletId.LibAppletOff, typeof(BrowserApplet) }, + { AppletId.Swkbd, typeof(SoftwareKeyboardApplet) }, + { AppletId.Web, typeof(BrowserApplet) }, + { AppletId.Shop, typeof(BrowserApplet) }, + { AppletId.OfflineWeb, typeof(BrowserApplet) }, }; } - public static IApplet Create(AppletId applet, Horizon system) + public static IApplet Create(AppletId applet) { if (_appletMapping.TryGetValue(applet, out Type appletClass)) { - return (IApplet)Activator.CreateInstance(appletClass, system); + return (IApplet)Activator.CreateInstance(appletClass); } throw new NotImplementedException($"{applet} applet is not implemented."); diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/BootDisplayKind.cs b/src/Ryujinx.Horizon/Applets/Browser/BootDisplayKind.cs similarity index 73% rename from src/Ryujinx.HLE/HOS/Applets/Browser/BootDisplayKind.cs rename to src/Ryujinx.Horizon/Applets/Browser/BootDisplayKind.cs index 3c5b1f1c4..bdf2d2189 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/BootDisplayKind.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/BootDisplayKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { enum BootDisplayKind { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserApplet.cs b/src/Ryujinx.Horizon/Applets/Browser/BrowserApplet.cs similarity index 89% rename from src/Ryujinx.HLE/HOS/Applets/Browser/BrowserApplet.cs rename to src/Ryujinx.Horizon/Applets/Browser/BrowserApplet.cs index 6afbe4a72..aad8224f0 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserApplet.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/BrowserApplet.cs @@ -1,12 +1,13 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using System; using System.Collections.Generic; using System.IO; -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { internal class BrowserApplet : IApplet { @@ -18,14 +19,12 @@ namespace Ryujinx.HLE.HOS.Applets.Browser private List _arguments; private ShimKind _shimKind; - public BrowserApplet(Horizon system) { } - - public ResultCode GetResult() + public Result GetResult() { - return ResultCode.Success; + return Result.Success; } - public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession) + public Result Start(AppletSession normalSession, AppletSession interactiveSession) { _normalSession = normalSession; @@ -65,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser AppletStateChanged?.Invoke(this, null); - return ResultCode.Success; + return Result.Success; } private static byte[] BuildResponseOld(WebCommonReturnValue result) diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserArgument.cs b/src/Ryujinx.Horizon/Applets/Browser/BrowserArgument.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/Browser/BrowserArgument.cs rename to src/Ryujinx.Horizon/Applets/Browser/BrowserArgument.cs index d2e1d55ca..a20b8ff58 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserArgument.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/BrowserArgument.cs @@ -1,10 +1,10 @@ -using Ryujinx.HLE.HOS.Services.Account.Acc; +using LibHac.Fs; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { class BrowserArgument { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutput.cs b/src/Ryujinx.Horizon/Applets/Browser/BrowserOutput.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutput.cs rename to src/Ryujinx.Horizon/Applets/Browser/BrowserOutput.cs index b0e2d0e1c..ac0d54b2b 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutput.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/BrowserOutput.cs @@ -2,7 +2,7 @@ using Ryujinx.Common; using System; using System.IO; -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { class BrowserOutput { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutputType.cs b/src/Ryujinx.Horizon/Applets/Browser/BrowserOutputType.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutputType.cs rename to src/Ryujinx.Horizon/Applets/Browser/BrowserOutputType.cs index b6908c474..5b6a82ea0 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/BrowserOutputType.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/BrowserOutputType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { enum BrowserOutputType : ushort { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/DocumentKind.cs b/src/Ryujinx.Horizon/Applets/Browser/DocumentKind.cs similarity index 75% rename from src/Ryujinx.HLE/HOS/Applets/Browser/DocumentKind.cs rename to src/Ryujinx.Horizon/Applets/Browser/DocumentKind.cs index 9e089a205..3df3abf53 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/DocumentKind.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/DocumentKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { enum DocumentKind { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/LeftStickMode.cs b/src/Ryujinx.Horizon/Applets/Browser/LeftStickMode.cs similarity index 64% rename from src/Ryujinx.HLE/HOS/Applets/Browser/LeftStickMode.cs rename to src/Ryujinx.Horizon/Applets/Browser/LeftStickMode.cs index 7c2f31a25..a72172142 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/LeftStickMode.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/LeftStickMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { enum LeftStickMode { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/ShimKind.cs b/src/Ryujinx.Horizon/Applets/Browser/ShimKind.cs similarity index 78% rename from src/Ryujinx.HLE/HOS/Applets/Browser/ShimKind.cs rename to src/Ryujinx.Horizon/Applets/Browser/ShimKind.cs index 60de546d3..1e972153a 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/ShimKind.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/ShimKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { public enum ShimKind : uint { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgHeader.cs b/src/Ryujinx.Horizon/Applets/Browser/WebArgHeader.cs similarity index 77% rename from src/Ryujinx.HLE/HOS/Applets/Browser/WebArgHeader.cs rename to src/Ryujinx.Horizon/Applets/Browser/WebArgHeader.cs index e67d70917..4aad876cf 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgHeader.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/WebArgHeader.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { public struct WebArgHeader { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLV.cs b/src/Ryujinx.Horizon/Applets/Browser/WebArgTLV.cs similarity index 75% rename from src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLV.cs rename to src/Ryujinx.Horizon/Applets/Browser/WebArgTLV.cs index a331e82fe..fdeba8ee6 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLV.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/WebArgTLV.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { public struct WebArgTLV { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLVType.cs b/src/Ryujinx.Horizon/Applets/Browser/WebArgTLVType.cs similarity index 97% rename from src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLVType.cs rename to src/Ryujinx.Horizon/Applets/Browser/WebArgTLVType.cs index 2f2450dcb..6feb42604 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/WebArgTLVType.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/WebArgTLVType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { enum WebArgTLVType : ushort { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/WebCommonReturnValue.cs b/src/Ryujinx.Horizon/Applets/Browser/WebCommonReturnValue.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/Browser/WebCommonReturnValue.cs rename to src/Ryujinx.Horizon/Applets/Browser/WebCommonReturnValue.cs index cc1f3706c..30117c5ad 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/WebCommonReturnValue.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/WebCommonReturnValue.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Memory; -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { public struct WebCommonReturnValue { diff --git a/src/Ryujinx.HLE/HOS/Applets/Browser/WebExitReason.cs b/src/Ryujinx.Horizon/Applets/Browser/WebExitReason.cs similarity index 78% rename from src/Ryujinx.HLE/HOS/Applets/Browser/WebExitReason.cs rename to src/Ryujinx.Horizon/Applets/Browser/WebExitReason.cs index ebb705acb..b301d9e9d 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Browser/WebExitReason.cs +++ b/src/Ryujinx.Horizon/Applets/Browser/WebExitReason.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Browser +namespace Ryujinx.Horizon.Applets.Browser { public enum WebExitReason : uint { diff --git a/src/Ryujinx.HLE/HOS/Applets/CommonArguments.cs b/src/Ryujinx.Horizon/Applets/CommonArguments.cs similarity index 91% rename from src/Ryujinx.HLE/HOS/Applets/CommonArguments.cs rename to src/Ryujinx.Horizon/Applets/CommonArguments.cs index 0360aff80..c2bdcf3e1 100644 --- a/src/Ryujinx.HLE/HOS/Applets/CommonArguments.cs +++ b/src/Ryujinx.Horizon/Applets/CommonArguments.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets { [StructLayout(LayoutKind.Sequential, Pack = 8)] struct CommonArguments diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerApplet.cs similarity index 89% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerApplet.cs index 5ec9d4b08..ac9b3db89 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerApplet.cs @@ -1,30 +1,23 @@ +using Ryujinx.Audio; +using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Logging; using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; -using Ryujinx.HLE.HOS.Services.Hid; -using Ryujinx.HLE.HOS.Services.Hid.Types; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using System; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using static Ryujinx.HLE.HOS.Services.Hid.HidServer.HidUtils; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { internal class ControllerApplet : IApplet { - private readonly Horizon _system; - private AppletSession _normalSession; public event EventHandler AppletStateChanged; - public ControllerApplet(Horizon system) - { - _system = system; - } - - public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession) + public Result Start(AppletSession normalSession, AppletSession interactiveSession) { _normalSession = normalSession; @@ -40,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Applets _normalSession.Push(BuildResponse()); // Dummy response for other modes AppletStateChanged?.Invoke(this, null); - return ResultCode.Success; + return Result.Success; } byte[] controllerSupportArg = _normalSession.Pop(); @@ -114,12 +107,12 @@ namespace Ryujinx.HLE.HOS.Applets _system.ReturnFocus(); - return ResultCode.Success; + return Result.Success; } - public ResultCode GetResult() + public Result GetResult() { - return ResultCode.Success; + return Result.Success; } private static byte[] BuildResponse(ControllerSupportResultInfo result) diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerAppletUIArgs.cs similarity index 80% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerAppletUIArgs.cs index 10cba58ba..71a7acad1 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerAppletUIArgs.cs @@ -1,7 +1,6 @@ -using Ryujinx.HLE.HOS.Services.Hid; using System.Collections.Generic; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { public struct ControllerAppletUIArgs { diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgHeader.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgHeader.cs similarity index 92% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgHeader.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgHeader.cs index b066da8e8..cf0234ee9 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgHeader.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgHeader.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { #pragma warning disable CS0649 // Field is never assigned to [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgPrivate.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgPrivate.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgPrivate.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgPrivate.cs index d5a18d468..1e25cdcdd 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgPrivate.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgPrivate.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { #pragma warning disable CS0649 // Field is never assigned to struct ControllerSupportArgPrivate diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgV7.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgV7.cs similarity index 94% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgV7.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgV7.cs index 0969493fa..bfe38bb89 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgV7.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgV7.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Memory; using System; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { #pragma warning disable CS0649 // Field is never assigned to // (8.0.0+ version) diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgVPre7.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgVPre7.cs similarity index 94% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgVPre7.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgVPre7.cs index 886782553..191764965 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportArgVPre7.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportArgVPre7.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Memory; using System; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { #pragma warning disable CS0649 // Field is never assigned to // (1.0.0+ version) diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportMode.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportMode.cs similarity index 78% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportMode.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportMode.cs index 5e181e197..a53320862 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportMode.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { enum ControllerSupportMode : byte { diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportResultInfo.cs b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportResultInfo.cs similarity index 89% rename from src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportResultInfo.cs rename to src/Ryujinx.Horizon/Applets/Controller/ControllerSupportResultInfo.cs index 96cfd5903..8a3fefa95 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerSupportResultInfo.cs +++ b/src/Ryujinx.Horizon/Applets/Controller/ControllerSupportResultInfo.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.Controller { #pragma warning disable CS0649 // Field is never assigned to [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/src/Ryujinx.HLE/HOS/Applets/Error/ApplicationErrorArg.cs b/src/Ryujinx.Horizon/Applets/Error/ApplicationErrorArg.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Applets/Error/ApplicationErrorArg.cs rename to src/Ryujinx.Horizon/Applets/Error/ApplicationErrorArg.cs index 0a20bee46..b6ac545a6 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Error/ApplicationErrorArg.cs +++ b/src/Ryujinx.Horizon/Applets/Error/ApplicationErrorArg.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.Error +namespace Ryujinx.Horizon.Applets.Error { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ApplicationErrorArg diff --git a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs b/src/Ryujinx.Horizon/Applets/Error/ErrorApplet.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs rename to src/Ryujinx.Horizon/Applets/Error/ErrorApplet.cs index 7ee9b9e90..f35b7cc95 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs +++ b/src/Ryujinx.Horizon/Applets/Error/ErrorApplet.cs @@ -6,8 +6,8 @@ using LibHac.Ncm; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; -using Ryujinx.HLE.HOS.SystemState; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using System; using System.Collections.Generic; using System.IO; @@ -16,7 +16,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; -namespace Ryujinx.HLE.HOS.Applets.Error +namespace Ryujinx.Horizon.Applets.Error { internal partial class ErrorApplet : IApplet { @@ -38,7 +38,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error _horizon = horizon; } - public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession) + public Result Start(AppletSession normalSession, AppletSession interactiveSession) { _normalSession = normalSession; _commonArguments = IApplet.ReadStruct(_normalSession.Pop()); @@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error AppletStateChanged?.Invoke(this, null); - return ResultCode.Success; + return Result.Success; } private static (uint module, uint description) HexToResultCode(uint resultCode) @@ -209,9 +209,9 @@ namespace Ryujinx.HLE.HOS.Applets.Error } } - public ResultCode GetResult() + public Result GetResult() { - return ResultCode.Success; + return Result.Success; } } } diff --git a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonArg.cs b/src/Ryujinx.Horizon/Applets/Error/ErrorCommonArg.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonArg.cs rename to src/Ryujinx.Horizon/Applets/Error/ErrorCommonArg.cs index 73e03a1b2..abc6a70b4 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonArg.cs +++ b/src/Ryujinx.Horizon/Applets/Error/ErrorCommonArg.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.Error +namespace Ryujinx.Horizon.Applets.Error { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ErrorCommonArg diff --git a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonHeader.cs b/src/Ryujinx.Horizon/Applets/Error/ErrorCommonHeader.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonHeader.cs rename to src/Ryujinx.Horizon/Applets/Error/ErrorCommonHeader.cs index d4f77d6ef..2be9fc72b 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorCommonHeader.cs +++ b/src/Ryujinx.Horizon/Applets/Error/ErrorCommonHeader.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.Error +namespace Ryujinx.Horizon.Applets.Error { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ErrorCommonHeader diff --git a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorType.cs b/src/Ryujinx.Horizon/Applets/Error/ErrorType.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/Error/ErrorType.cs rename to src/Ryujinx.Horizon/Applets/Error/ErrorType.cs index 548176980..3c878463c 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Error/ErrorType.cs +++ b/src/Ryujinx.Horizon/Applets/Error/ErrorType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.Error +namespace Ryujinx.Horizon.Applets.Error { enum ErrorType : byte { diff --git a/src/Ryujinx.HLE/HOS/Applets/IApplet.cs b/src/Ryujinx.Horizon/Applets/IApplet.cs similarity index 62% rename from src/Ryujinx.HLE/HOS/Applets/IApplet.cs rename to src/Ryujinx.Horizon/Applets/IApplet.cs index 985887c47..5bf29a5da 100644 --- a/src/Ryujinx.HLE/HOS/Applets/IApplet.cs +++ b/src/Ryujinx.Horizon/Applets/IApplet.cs @@ -1,19 +1,19 @@ -using Ryujinx.HLE.HOS.Services.Am.AppletAE; -using Ryujinx.HLE.UI; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using Ryujinx.Memory; using System; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets { - interface IApplet + public interface IApplet { event EventHandler AppletStateChanged; - ResultCode Start(AppletSession normalSession, - AppletSession interactiveSession); + Result Start(AppletSession normalSession, + AppletSession interactiveSession); - ResultCode GetResult(); + Result GetResult(); bool DrawTo(RenderingSurfaceInfo surfaceInfo, IVirtualMemoryManager destination, ulong position) { diff --git a/src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs b/src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectApplet.cs similarity index 70% rename from src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs rename to src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectApplet.cs index ccc761ba1..d658d745f 100644 --- a/src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectApplet.cs +++ b/src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectApplet.cs @@ -1,15 +1,13 @@ using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Account.Acc; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using System; using System.IO; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.PlayerSelect { internal class PlayerSelectApplet : IApplet { - private readonly Horizon _system; - private AppletSession _normalSession; #pragma warning disable IDE0052 // Remove unread private member private AppletSession _interactiveSession; @@ -17,12 +15,7 @@ namespace Ryujinx.HLE.HOS.Applets public event EventHandler AppletStateChanged; - public PlayerSelectApplet(Horizon system) - { - _system = system; - } - - public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession) + public Result Start(AppletSession normalSession, AppletSession interactiveSession) { _normalSession = normalSession; _interactiveSession = interactiveSession; @@ -34,12 +27,12 @@ namespace Ryujinx.HLE.HOS.Applets _system.ReturnFocus(); - return ResultCode.Success; + return Result.Success; } - public ResultCode GetResult() + public Result GetResult() { - return ResultCode.Success; + return Result.Success; } private byte[] BuildResponse() diff --git a/src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectResult.cs b/src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectResult.cs similarity index 66% rename from src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectResult.cs rename to src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectResult.cs index c0475b75a..8c90c24a4 100644 --- a/src/Ryujinx.HLE/HOS/Applets/PlayerSelect/PlayerSelectResult.cs +++ b/src/Ryujinx.Horizon/Applets/PlayerSelect/PlayerSelectResult.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.PlayerSelect { enum PlayerSelectResult : ulong { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/CJKCharacterValidation.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/CJKCharacterValidation.cs similarity index 92% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/CJKCharacterValidation.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/CJKCharacterValidation.cs index 6134a3cdd..655c7f522 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/CJKCharacterValidation.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/CJKCharacterValidation.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { public static partial class CJKCharacterValidation { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InitialCursorPosition.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InitialCursorPosition.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InitialCursorPosition.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InitialCursorPosition.cs index a95af67a8..cc453f85f 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InitialCursorPosition.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InitialCursorPosition.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies the initial position of the cursor displayed in the area. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs index f95a3627d..b6b8ff1d1 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardRequest.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Possible requests to the software keyboard when running in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs index ed4b78c8e..6aa0a31ed 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardResponse.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Possible responses from the software keyboard when running in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardState.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardState.cs similarity index 95% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardState.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardState.cs index 91d0164e3..46bea5042 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineKeyboardState.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineKeyboardState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Possible states for the software keyboard when running in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineResponses.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineResponses.cs similarity index 99% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineResponses.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineResponses.cs index 46e541a9e..0c31ba0ae 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InlineResponses.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InlineResponses.cs @@ -1,7 +1,7 @@ using System.IO; using System.Text; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { internal class InlineResponses { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InputFormMode.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InputFormMode.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InputFormMode.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InputFormMode.cs index 780c82b53..39f485b2d 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InputFormMode.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InputFormMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies the text entry mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidButtonFlags.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidButtonFlags.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidButtonFlags.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidButtonFlags.cs index 8d81d4a11..83b9215bf 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidButtonFlags.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidButtonFlags.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies prohibited buttons. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidCharFlags.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidCharFlags.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidCharFlags.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidCharFlags.cs index aa703f5d6..6d9977f0f 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/InvalidCharFlags.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/InvalidCharFlags.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies prohibited character sets. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs similarity index 92% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs index 6f7f6d2a9..1d80ebcc4 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardCalcFlags.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Bitmask of commands encoded in the Flags field of the Calc structs. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardInputMode.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardInputMode.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardInputMode.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardInputMode.cs index a75ef8cc6..db093945f 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardInputMode.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardInputMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Active input options set by the keyboard applet. These options allow keyboard diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs similarity index 81% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs index 3c96a61ab..fc308736e 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMiniaturizationMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// The miniaturization mode used by the keyboard in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMode.cs similarity index 94% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMode.cs index aa79dd426..0f376e3f6 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies the variant of keyboard displayed on screen. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardResult.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardResult.cs similarity index 81% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardResult.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardResult.cs index 7c6d5c70b..0fcb1e76b 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardResult.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/KeyboardResult.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// The intention of the user when they finish the interaction with the keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/NumericCharacterValidation.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/NumericCharacterValidation.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/NumericCharacterValidation.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/NumericCharacterValidation.cs index d72b68eae..a7dee57d2 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/NumericCharacterValidation.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/NumericCharacterValidation.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { public static partial class NumericCharacterValidation { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/PasswordMode.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/PasswordMode.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/PasswordMode.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/PasswordMode.cs index 040eee3e4..6fdb6777b 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/PasswordMode.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/PasswordMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies the display mode of text in a password field. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnA.png b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnA.png similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnA.png rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnA.png diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnA.svg b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnA.svg similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnA.svg rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnA.svg diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnB.png b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnB.png similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnB.png rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnB.png diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnB.svg b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnB.svg similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_BtnB.svg rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_BtnB.svg diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.png b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.png similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.png rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.png diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.svg b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.svg similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.svg rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Icon_KeyF6.svg diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Logo_Ryujinx.png b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Logo_Ryujinx.png similarity index 100% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/Resources/Logo_Ryujinx.png rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/Resources/Logo_Ryujinx.png diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs index 49c8160d1..13dee6d7c 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppear.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure with appearance configurations for the software keyboard when running in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs index 31cb27e22..8af044184 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardAppearEx.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure with appearance configurations for the software keyboard when running in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 0462a5b00..87e17c5b7 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -1,11 +1,8 @@ using Ryujinx.Common; using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Logging; -using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; -using Ryujinx.HLE.HOS.Services.Am.AppletAE; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; -using Ryujinx.HLE.UI; -using Ryujinx.HLE.UI.Input; +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; using Ryujinx.Memory; using System; using System.Diagnostics; @@ -15,9 +12,9 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { - internal class SoftwareKeyboardApplet : IApplet + public class SoftwareKeyboardApplet : IApplet { private const string DefaultInputText = "Ryujinx"; @@ -71,7 +68,7 @@ namespace Ryujinx.HLE.HOS.Applets _device = system.Device; } - public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession) + public Result Start(AppletSession normalSession, AppletSession interactiveSession) { lock (_lock) { @@ -139,14 +136,14 @@ namespace Ryujinx.HLE.HOS.Applets ExecuteForegroundKeyboard(); - return ResultCode.Success; + return Result.Success; } } } - public ResultCode GetResult() + public Result GetResult() { - return ResultCode.Success; + return Result.Success; } private bool IsKeyboardActive() @@ -774,7 +771,7 @@ namespace Ryujinx.HLE.HOS.Applets /// /// The input string to sanitize (may be null). /// The sanitized string. - internal static string StripUnicodeControlCodes(string input) + public static string StripUnicodeControlCodes(string input) { if (input is null) { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs similarity index 99% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs index cb02f8b46..ed397dd0c 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure with configuration options of the software keyboard when starting a new input request in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs similarity index 99% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs index abc3950cc..c5768fa62 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCalcEx.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure with configuration options of the software keyboard when starting a new input request in inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs index 5261bc8f4..957cb294b 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure that defines the configuration options of the software keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs index 4d08dda17..f4655200a 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardCustomizeDic.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure used by SetCustomizeDic request to software keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs similarity index 94% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs index 0d757c442..54ac33587 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs @@ -1,7 +1,7 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure with custom dictionary words for the software keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs similarity index 93% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs index 743d40a2e..4abfc2636 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardInitialize.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure that mirrors the parameters used to initialize the keyboard applet. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs index 3f7516e6a..8f058d811 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRenderer.cs @@ -1,9 +1,8 @@ -using Ryujinx.HLE.UI; using Ryujinx.Memory; using System; using System.Threading; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Class that manages the renderer base class and its state in a multithreaded context. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs similarity index 99% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs index 0b87f87ad..5c50a2c37 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs @@ -1,4 +1,3 @@ -using Ryujinx.HLE.UI; using Ryujinx.Memory; using SixLabors.Fonts; using SixLabors.ImageSharp; @@ -12,7 +11,7 @@ using System.Numerics; using System.Reflection; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Base class that generates the graphics for the software keyboard applet during inline mode. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs similarity index 92% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs index 86302e492..ec88e5d32 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Identifies the software keyboard state. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs similarity index 80% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs index 854f04a3b..e7ecf6cc7 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIArgs.cs @@ -1,6 +1,4 @@ -using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; - -namespace Ryujinx.HLE.HOS.Applets +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { public struct SoftwareKeyboardUIArgs { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs index 6199ff666..7bc563763 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUIState.cs @@ -1,6 +1,4 @@ -using Ryujinx.HLE.UI; - -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// TODO diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs index 84836884d..a6c89a120 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/SoftwareKeyboardUserWord.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A structure used by SetUserWordInfo request to the software keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TRef.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TRef.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TRef.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TRef.cs index 32d9e68da..11a293bde 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TRef.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TRef.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// Wraps a type in a class so it gets stored in the GC managed heap. This is used as communication mechanism diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TimedAction.cs similarity index 99% rename from src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs rename to src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TimedAction.cs index 3eaf64596..593447649 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs +++ b/src/Ryujinx.Horizon/Applets/SoftwareKeyboard/TimedAction.cs @@ -1,7 +1,7 @@ using System; using System.Threading; -namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +namespace Ryujinx.Horizon.Applets.SoftwareKeyboard { /// /// A threaded executor of periodic actions that can be cancelled. The total execution time is optional diff --git a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj index d1f572d5c..fee1dd133 100644 --- a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj +++ b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj @@ -15,6 +15,15 @@ + + + + + + + + + diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs index abe0f5ce6..95e95d3cb 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs @@ -6,11 +6,11 @@ namespace Ryujinx.Horizon.Sdk.Am.Controllers { interface ILibraryAppletCreator : IServiceObject { - Result CreateLibraryApplet(out ILibraryAppletAccessor arg0, uint arg1, uint arg2); + Result CreateLibraryApplet(out ILibraryAppletAccessor libraryAppletAccessor, uint appletId, uint libraryAppletMode); Result TerminateAllLibraryApplets(); Result AreAnyLibraryAppletsLeft(out bool arg0); - Result CreateStorage(out IStorage arg0, long arg1); - Result CreateTransferMemoryStorage(out IStorage arg0, int arg1, long arg2, bool arg3); - Result CreateHandleStorage(out IStorage arg0, int arg1, long arg2); + Result CreateStorage(out IStorage storage, long size); + Result CreateTransferMemoryStorage(out IStorage storage, int handle, long size, bool writeable); + Result CreateHandleStorage(out IStorage storage, int handle, long size); } } diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/AppletMessage.cs b/src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/AppletMessage.cs rename to src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs index 3f4600fa5..641bd1bc1 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/Types/AppletMessage.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Types/AppletMessage.cs @@ -1,6 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy +namespace Ryujinx.Horizon.Sdk.Am.Types { - enum AppletMessage + public enum AppletMessage { None = 0, ChangeIntoForeground = 1, @@ -33,4 +33,5 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys AlbumScreenShotTaken = 92, AlbumRecordingSaved = 93, } + } diff --git a/src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs b/src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs new file mode 100644 index 000000000..dddf04d5a --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Types/FocusState.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.Horizon.Sdk.Am.Types +{ + public enum FocusState + { + InFocus = 1, + OutOfFocus = 2, + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/ProgramSpecifyKind.cs b/src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs similarity index 59% rename from src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/ProgramSpecifyKind.cs rename to src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs index 47a755f93..11ab323b0 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/Types/ProgramSpecifyKind.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Types/ProgramSpecifyKind.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types +namespace Ryujinx.Horizon.Sdk.Am.Types { public enum ProgramSpecifyKind : uint { diff --git a/src/Ryujinx.Horizon/ServiceTable.cs b/src/Ryujinx.Horizon/ServiceTable.cs index 15dcbc261..6bd0bc2c8 100644 --- a/src/Ryujinx.Horizon/ServiceTable.cs +++ b/src/Ryujinx.Horizon/ServiceTable.cs @@ -1,7 +1,6 @@ using Ryujinx.Horizon.Arp; using Ryujinx.Horizon.Audio; using Ryujinx.Horizon.Am; -using Ryujinx.Horizon.Arp; using Ryujinx.Horizon.Bcat; using Ryujinx.Horizon.Friends; using Ryujinx.Horizon.Hshl; diff --git a/src/Ryujinx.Tests/HLE/SoftwareKeyboardTests.cs b/src/Ryujinx.Tests/Horizon/SoftwareKeyboardTests.cs similarity index 96% rename from src/Ryujinx.Tests/HLE/SoftwareKeyboardTests.cs rename to src/Ryujinx.Tests/Horizon/SoftwareKeyboardTests.cs index 79ca2d480..5a832d2ce 100644 --- a/src/Ryujinx.Tests/HLE/SoftwareKeyboardTests.cs +++ b/src/Ryujinx.Tests/Horizon/SoftwareKeyboardTests.cs @@ -1,8 +1,8 @@ using NUnit.Framework; -using Ryujinx.HLE.HOS.Applets; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; using System.Text; -namespace Ryujinx.Tests.HLE +namespace Ryujinx.Tests.Horizon { public class SoftwareKeyboardTests { diff --git a/src/Ryujinx.Tests/Ryujinx.Tests.csproj b/src/Ryujinx.Tests/Ryujinx.Tests.csproj index 3be9787a3..f3e2a1dfa 100644 --- a/src/Ryujinx.Tests/Ryujinx.Tests.csproj +++ b/src/Ryujinx.Tests/Ryujinx.Tests.csproj @@ -27,6 +27,7 @@ + diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs index 4bcc35a7a..a69310875 100644 --- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs @@ -6,9 +6,10 @@ using Ryujinx.Ava.UI.Controls; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Windows; using Ryujinx.HLE; -using Ryujinx.HLE.HOS.Applets; -using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; using Ryujinx.HLE.UI; +using Ryujinx.Horizon.Applets.Controller; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Sdk.Am.Types; using System; using System.Threading; diff --git a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs index 5a98b1645..979e56155 100644 --- a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs +++ b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs @@ -7,8 +7,8 @@ using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Windows; using Ryujinx.Common; -using Ryujinx.HLE.HOS.Applets; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Applets.Controller; using System; using System.Linq; using System.Threading.Tasks; diff --git a/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml.cs b/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml.cs index af3837e43..b47961b22 100644 --- a/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml.cs +++ b/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml.cs @@ -5,8 +5,7 @@ using Avalonia.Media; using FluentAvalonia.UI.Controls; using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.UI.Helpers; -using Ryujinx.HLE.HOS.Applets; -using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; +using Ryujinx.Horizon.Applets.SoftwareKeyboard; using System; using System.Linq; using System.Threading.Tasks;