More migration

This commit is contained in:
Isaac Marovitz 2024-03-10 14:04:35 +00:00
parent b093a3fbf6
commit 565a40f854
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
38 changed files with 43 additions and 151 deletions

View File

@ -1,5 +1,5 @@
using Gtk;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using Ryujinx.Input.GTK3;
using Ryujinx.UI.Widgets;
using System.Threading;

View File

@ -1,8 +1,8 @@
using Gtk;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.Applets.Controller;
using Ryujinx.Horizon.Applets.SoftwareKeyboard;
using Ryujinx.Horizon.Sdk.Am.Types;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.UI;
using Ryujinx.UI.Widgets;
using System;
using System.Threading;

View File

@ -1,5 +1,5 @@
using Gtk;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using System.Diagnostics;
namespace Ryujinx.UI.Applet

View File

@ -7,7 +7,7 @@ using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.SystemState;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using System;
namespace Ryujinx.HLE

View File

@ -28,7 +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 Ryujinx.Horizon.Sdk.Am;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,27 +0,0 @@
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
enum AppletId
{
Application = 0x01,
OverlayDisplay = 0x02,
QLaunch = 0x03,
Starter = 0x04,
Auth = 0x0A,
Cabinet = 0x0B,
Controller = 0x0C,
DataErase = 0x0D,
Error = 0x0E,
NetConnect = 0x0F,
PlayerSelect = 0x10,
SoftwareKeyboard = 0x11,
MiiEdit = 0x12,
LibAppletWeb = 0x13,
LibAppletShop = 0x14,
PhotoViewer = 0x15,
Settings = 0x16,
LibAppletOff = 0x17,
LibAppletWhitelisted = 0x18,
LibAppletAuth = 0x19,
MyPage = 0x1A,
}
}

View File

@ -1,12 +0,0 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
[StructLayout(LayoutKind.Sequential, Size = 0x4)]
struct AppletProcessLaunchReason
{
public byte Flag;
public ushort Unknown1;
public byte Unknown2;
}
}

View File

@ -1,11 +0,0 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
[StructLayout(LayoutKind.Sequential, Size = 0x8)]
struct LibraryAppletInfo
{
public AppletId AppletId;
public LibraryAppletMode LibraryAppletMode;
}
}

View File

@ -1,14 +0,0 @@
using System;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
[Flags]
enum LibraryAppletMode : uint
{
AllForeground,
PartialForeground,
NoUi,
PartialForegroundWithIndirectDisplay,
AllForegroundInitiallyHidden,
}
}

View File

@ -7,7 +7,6 @@ using Ryujinx.HLE.HOS.Services.SurfaceFlinger;
using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService;
using Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService.Types;
using Ryujinx.HLE.HOS.Services.Vi.Types;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.Common;
using System;
using System.Collections.Generic;

View File

@ -1,5 +1,5 @@
using Ryujinx.HLE.HOS.Kernel.Threading;
using Ryujinx.Horizon.Sdk.Am.Types;
using Ryujinx.Horizon.Sdk.Am;
using System.Collections.Concurrent;
namespace Ryujinx.HLE.HOS.SystemState

View File

@ -1,5 +1,4 @@
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.Sdk.Am.Types;
using System;
using System.Collections.Generic;

View File

@ -7,7 +7,7 @@ using Ryujinx.HLE.HOS;
using Ryujinx.HLE.HOS.Services.Apm;
using Ryujinx.HLE.HOS.Services.Hid;
using Ryujinx.HLE.Loaders.Processes;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using Ryujinx.Memory;
using System;

View File

@ -1,6 +0,0 @@
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
namespace Ryujinx.HLE.UI.Input
{
delegate void NpadButtonHandler(int npadIndex, NpadButton button);
}

View File

@ -1,4 +1,4 @@
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,4 +1,4 @@
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
namespace Ryujinx.Headless.SDL2
{

View File

@ -5,10 +5,10 @@ using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.GAL.Multithreading;
using Ryujinx.Graphics.Gpu;
using Ryujinx.Graphics.OpenGL;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.Applets.Controller;
using Ryujinx.Horizon.Applets.SoftwareKeyboard;
using Ryujinx.Horizon.Sdk.Am.Types;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.UI;
using Ryujinx.Input;
using Ryujinx.Input.HLE;
using Ryujinx.SDL2.Common;

View File

@ -1,14 +1,14 @@
using LibHac.Fs;
using Ryujinx.Common.Memory;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using System.IO;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage
namespace Ryujinx.Horizon.Am.Ipc.Storage
{
class StorageHelper
public class StorageHelper
{
private const uint LaunchParamsMagic = 0xc79497ca;
public static byte[] MakeLaunchParams(UserProfile userProfile)
public static byte[] MakeLaunchParams(UserId userId)
{
// Size needs to be at least 0x88 bytes otherwise application errors.
using MemoryStream ms = MemoryStreamManager.Shared.GetStream();
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage
writer.Write(LaunchParamsMagic);
writer.Write(1); // IsAccountSelected? Only lower 8 bits actually used.
userProfile.UserId.Write(writer);
writer.Write(userId.AsBytes());
return ms.ToArray();
}

View File

@ -3,6 +3,7 @@ using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Logging;
using Ryujinx.Horizon.Common;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.UI.Input;
using Ryujinx.Memory;
using System;
using System.Diagnostics;
@ -107,7 +108,7 @@ namespace Ryujinx.Horizon.Applets.SoftwareKeyboard
_keyboardRenderer = new SoftwareKeyboardRenderer(_device.UIHandler.HostUITheme);
}
return ResultCode.Success;
return Result.Success;
}
else
{
@ -494,7 +495,7 @@ namespace Ryujinx.Horizon.Applets.SoftwareKeyboard
_npads.Update(true);
NpadButton buttons = _npads.GetCurrentButtonsOfAllNpads();
NpadReader buttons = _npads.GetCurrentButtonsOfAllNpads();
// Block the input if the current accept key is pressed so the applet won't be instantly closed.
_canAcceptController = (buttons & NpadButton.A) == 0;

View File

@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
namespace Ryujinx.Horizon.Sdk.Am
{
[StructLayout(LayoutKind.Sequential, Size = 0x10)]
struct AppletIdentifyInfo

View File

@ -1,4 +1,4 @@
namespace Ryujinx.Horizon.Sdk.Am.Types
namespace Ryujinx.Horizon.Sdk.Am
{
public enum FocusState
{

View File

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types
namespace Ryujinx.Horizon.Sdk.Am
{
public enum LaunchParameterKind : uint
{

View File

@ -1,4 +1,4 @@
namespace Ryujinx.Horizon.Sdk.Am.Types
namespace Ryujinx.Horizon.Sdk.Am
{
public enum ProgramSpecifyKind : uint
{

View File

@ -1,37 +0,0 @@
namespace Ryujinx.Horizon.Sdk.Am.Types
{
public enum AppletMessage
{
None = 0,
ChangeIntoForeground = 1,
ChangeIntoBackground = 2,
Exit = 4,
ApplicationExited = 6,
FocusStateChanged = 15,
Resume = 16,
DetectShortPressingHomeButton = 20,
DetectLongPressingHomeButton = 21,
DetectShortPressingPowerButton = 22,
DetectMiddlePressingPowerButton = 23,
DetectLongPressingPowerButton = 24,
RequestToPrepareSleep = 25,
FinishedSleepSequence = 26,
SleepRequiredByHighTemperature = 27,
SleepRequiredByLowBattery = 28,
AutoPowerDown = 29,
OperationModeChanged = 30,
PerformanceModeChanged = 31,
DetectReceivingCecSystemStandby = 32,
SdCardRemoved = 33,
LaunchApplicationRequested = 50,
RequestToDisplay = 51,
ShowApplicationLogo = 55,
HideApplicationLogo = 56,
ForceHideApplicationLogo = 57,
FloatingApplicationDetected = 60,
DetectShortPressingCaptureButton = 90,
AlbumScreenShotTaken = 92,
AlbumRecordingSaved = 93,
}
}

View File

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public delegate void DynamicTextChangedHandler(string text, int cursorBegin, int cursorEnd, bool overwriteMode);
}

View File

@ -1,6 +1,6 @@
using System;
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public interface IDynamicTextInputHandler : IDisposable
{

View File

@ -1,8 +1,8 @@
using Ryujinx.Horizon.Applets.Controller;
using Ryujinx.Horizon.Applets.SoftwareKeyboard;
using Ryujinx.Horizon.Sdk.Am.Types;
using Ryujinx.Horizon.Sdk.Am;
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public interface IHostUIHandler
{

View File

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public interface IHostUITheme
{

View File

@ -0,0 +1,4 @@
namespace Ryujinx.Horizon.UI.Input
{
delegate void NpadButtonHandler(int npadIndex, NpadButton button);
}

View File

@ -1,7 +1,4 @@
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common;
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
namespace Ryujinx.HLE.UI.Input
namespace Ryujinx.Horizon.UI.Input
{
/// <summary>
/// Class that converts Hid entries for the Npad into pressed / released events.

View File

@ -1,6 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public delegate bool KeyPressedHandler(Key key);
}

View File

@ -1,6 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public delegate bool KeyReleasedHandler(Key key);
}

View File

@ -1,7 +1,6 @@
using Ryujinx.HLE.HOS.Services.SurfaceFlinger;
using System;
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
/// <summary>
/// Information about the indirect layer that is being drawn to.

View File

@ -1,4 +1,4 @@
namespace Ryujinx.HLE.UI
namespace Ryujinx.Horizon.UI
{
public readonly struct ThemeColor
{

View File

@ -6,10 +6,10 @@ using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.HLE;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.Applets.Controller;
using Ryujinx.Horizon.Applets.SoftwareKeyboard;
using Ryujinx.Horizon.Sdk.Am.Types;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.UI;
using System;
using System.Threading;

View File

@ -5,7 +5,7 @@ using Avalonia.Threading;
using Ryujinx.Ava.Input;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using System;
using System.Threading;
using HidKey = Ryujinx.Common.Configuration.Hid.Key;

View File

@ -1,6 +1,6 @@
using Avalonia.Media;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using System;
namespace Ryujinx.Ava.UI.Applet

View File

@ -25,7 +25,7 @@ using Ryujinx.HLE;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.UI;
using Ryujinx.Horizon.UI;
using Ryujinx.Input.HLE;
using Ryujinx.Modules;
using Ryujinx.UI.App.Common;