mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 05:35:47 +00:00
@@ -1,3 +1,4 @@
|
||||
using Microsoft.IO;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Memory;
|
||||
@@ -63,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
||||
|
||||
private static byte[] BuildResponseOld(WebCommonReturnValue result)
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
writer.WriteStruct(result);
|
||||
|
||||
@@ -71,7 +72,7 @@ namespace Ryujinx.HLE.HOS.Applets.Browser
|
||||
}
|
||||
private byte[] BuildResponseNew(List<BrowserOutput> outputArguments)
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
writer.WriteStruct(new WebArgHeader
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using Ryujinx.HLE.HOS.Services.Hid.HidServer;
|
||||
using Ryujinx.HLE.HOS.Services.Hid;
|
||||
using Ryujinx.HLE.HOS.Services.Hid.HidServer;
|
||||
using Ryujinx.HLE.HOS.Services.Nfc.Nfp;
|
||||
using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager;
|
||||
using System;
|
||||
@@ -75,7 +75,7 @@ namespace Ryujinx.HLE.HOS.Applets.Cabinet
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
private void StartFormatter(ref StartParamForAmiiboSettings startParam)
|
||||
private static void StartFormatter(ref StartParamForAmiiboSettings startParam)
|
||||
{
|
||||
// Initialize RegisterInfo
|
||||
startParam.RegisterInfo = new RegisterInfo();
|
||||
@@ -109,6 +109,7 @@ namespace Ryujinx.HLE.HOS.Applets.Cabinet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VirtualAmiibo.UpdateNickName(amiiboId, newName);
|
||||
}
|
||||
|
||||
@@ -154,9 +155,9 @@ namespace Ryujinx.HLE.HOS.Applets.Cabinet
|
||||
public unsafe struct ReturnValueForAmiiboSettings
|
||||
{
|
||||
public byte AmiiboSettingsReturnFlag;
|
||||
private byte Padding1;
|
||||
private byte Padding2;
|
||||
private byte Padding3;
|
||||
private readonly byte Padding1;
|
||||
private readonly byte Padding2;
|
||||
private readonly byte Padding3;
|
||||
public DeviceHandle DeviceHandle;
|
||||
public TagInfo TagInfo;
|
||||
public RegisterInfo RegisterInfo;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.IO;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
@@ -119,7 +120,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
|
||||
private static byte[] BuildResponse(ControllerSupportResultInfo result)
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
|
||||
writer.Write(MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(ref result, Unsafe.SizeOf<ControllerSupportResultInfo>())));
|
||||
@@ -129,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
|
||||
private static byte[] BuildResponse()
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
|
||||
writer.Write((ulong)ResultCode.Success);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.IO;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using System;
|
||||
@@ -9,14 +10,14 @@ namespace Ryujinx.HLE.HOS.Applets.Dummy
|
||||
{
|
||||
private readonly Horizon _system;
|
||||
private AppletSession _normalSession;
|
||||
|
||||
|
||||
public event EventHandler AppletStateChanged;
|
||||
|
||||
|
||||
public DummyApplet(Horizon system)
|
||||
{
|
||||
_system = system;
|
||||
}
|
||||
|
||||
|
||||
public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession)
|
||||
{
|
||||
_normalSession = normalSession;
|
||||
@@ -25,10 +26,10 @@ namespace Ryujinx.HLE.HOS.Applets.Dummy
|
||||
_system.ReturnFocus();
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
|
||||
private static byte[] BuildResponse()
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
writer.Write((ulong)ResultCode.Success);
|
||||
return stream.ToArray();
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
||||
string[] buttons = GetButtonsText(module, description, "DlgBtn");
|
||||
|
||||
(uint Module, uint Description) errorCodeTuple = (module, uint.Parse(description.ToString("0000")));
|
||||
|
||||
|
||||
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons, errorCodeTuple);
|
||||
if (showDetails)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.IO;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
@@ -26,7 +27,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
_normalSession = normalSession;
|
||||
_interactiveSession = interactiveSession;
|
||||
|
||||
|
||||
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
|
||||
if (selected == null)
|
||||
{
|
||||
@@ -40,6 +41,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
_normalSession.Push(BuildResponse(selected));
|
||||
}
|
||||
|
||||
AppletStateChanged?.Invoke(this, null);
|
||||
|
||||
_system.ReturnFocus();
|
||||
@@ -47,9 +49,9 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
private byte[] BuildResponse(UserProfile selectedUser)
|
||||
private static byte[] BuildResponse(UserProfile selectedUser)
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
|
||||
writer.Write((ulong)PlayerSelectResult.Success);
|
||||
@@ -58,22 +60,22 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
|
||||
return stream.ToArray();
|
||||
}
|
||||
|
||||
private byte[] BuildGuestResponse()
|
||||
|
||||
private static byte[] BuildGuestResponse()
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
|
||||
|
||||
writer.Write(new byte());
|
||||
|
||||
return stream.ToArray();
|
||||
}
|
||||
|
||||
private byte[] BuildResponse()
|
||||
|
||||
private static byte[] BuildResponse()
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
|
||||
|
||||
writer.Write((ulong)PlayerSelectResult.Failure);
|
||||
|
||||
return stream.ToArray();
|
||||
|
||||
@@ -147,19 +147,19 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
|
||||
private bool IsKeyboardActive()
|
||||
{
|
||||
return _backgroundState >= InlineKeyboardState.Appearing && _backgroundState < InlineKeyboardState.Disappearing;
|
||||
return _backgroundState is >= InlineKeyboardState.Appearing and < InlineKeyboardState.Disappearing;
|
||||
}
|
||||
|
||||
private bool InputModeControllerEnabled()
|
||||
{
|
||||
return _inputMode == KeyboardInputMode.ControllerAndKeyboard ||
|
||||
_inputMode == KeyboardInputMode.ControllerOnly;
|
||||
return _inputMode is KeyboardInputMode.ControllerAndKeyboard or
|
||||
KeyboardInputMode.ControllerOnly;
|
||||
}
|
||||
|
||||
private bool InputModeTypingEnabled()
|
||||
{
|
||||
return _inputMode == KeyboardInputMode.ControllerAndKeyboard ||
|
||||
_inputMode == KeyboardInputMode.KeyboardOnly;
|
||||
return _inputMode is KeyboardInputMode.ControllerAndKeyboard or
|
||||
KeyboardInputMode.KeyboardOnly;
|
||||
}
|
||||
|
||||
private void AdvanceInputMode()
|
||||
@@ -365,6 +365,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_interactiveSession.Push(InlineResponses.ReleasedUserWordInfo(_backgroundState));
|
||||
break;
|
||||
case InlineKeyboardRequest.SetCustomizeDic:
|
||||
@@ -378,6 +379,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
_keyboardBackgroundDic = reader.ReadStruct<SoftwareKeyboardCustomizeDic>();
|
||||
}
|
||||
|
||||
break;
|
||||
case InlineKeyboardRequest.SetCustomizedDictionaries:
|
||||
// Read the custom dictionaries data.
|
||||
@@ -390,6 +392,7 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
{
|
||||
_keyboardBackgroundDictSet = reader.ReadStruct<SoftwareKeyboardDictSet>();
|
||||
}
|
||||
|
||||
break;
|
||||
case InlineKeyboardRequest.Calc:
|
||||
// The Calc request is used to communicate configuration changes and commands to the keyboard.
|
||||
|
||||
@@ -198,6 +198,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SKCanvas canvas = _surface.Canvas;
|
||||
|
||||
canvas.Clear(SKColors.Transparent);
|
||||
|
||||
Reference in New Issue
Block a user