mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-08 12:58:57 +02:00
Android changes
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||
{
|
||||
byte[] defaultUserImage = EmbeddedResources.Read("Ryujinx.HLE/HOS/Services/Account/Acc/DefaultUserImage.jpg");
|
||||
|
||||
AddUser("RyuPlayer", defaultUserImage, DefaultUserId);
|
||||
AddUser("KenPlayer", defaultUserImage, DefaultUserId);
|
||||
|
||||
OpenUser(DefaultUserId);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
||||
{
|
||||
try
|
||||
{
|
||||
_portMapping = new Mapping(Protocol.Tcp, PrivatePort, _publicPort, PortLeaseLength, "Ryujinx Local Multiplayer");
|
||||
_portMapping = new Mapping(Protocol.Tcp, PrivatePort, _publicPort, PortLeaseLength, "Kenji-NX Local Multiplayer");
|
||||
|
||||
await device.CreatePortMapAsync(_portMapping);
|
||||
|
||||
@@ -364,7 +364,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
||||
|
||||
try
|
||||
{
|
||||
Task delete = _natDevice?.DeletePortMapAsync(new Mapping(Protocol.Tcp, PrivatePort, _publicPort, 60, "Ryujinx Local Multiplayer"));
|
||||
Task delete = _natDevice?.DeletePortMapAsync(new Mapping(Protocol.Tcp, PrivatePort, _publicPort, 60, "Kenji-NX Local Multiplayer"));
|
||||
|
||||
// Just absorb any exceptions.
|
||||
delete?.ContinueWith((task) => { });
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string userName)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
string nickname = amiiboFile.NickName ?? "Ryujinx";
|
||||
string nickname = amiiboFile.NickName ?? "Kenji-NX";
|
||||
if (NickName != string.Empty)
|
||||
{
|
||||
nickname = NickName;
|
||||
|
||||
@@ -25,7 +25,10 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||
IsAnyInternetRequestAccepted = true, // NOTE: Why not accept any internet request?
|
||||
};
|
||||
|
||||
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
||||
if (!Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
||||
}
|
||||
|
||||
GeneralServiceManager.Add(_generalServiceDetail);
|
||||
}
|
||||
@@ -84,7 +87,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||
networkProfile.IpSettingData.IpAddressSetting = new IpAddressSetting(interfaceProperties, unicastAddress);
|
||||
networkProfile.IpSettingData.DnsSetting = new DnsSetting(interfaceProperties);
|
||||
|
||||
"RyujinxNetwork"u8.CopyTo(networkProfile.Name.AsSpan());
|
||||
"KenjinxNetwork"u8.CopyTo(networkProfile.Name.AsSpan());
|
||||
|
||||
context.Memory.Write(networkProfileDataPosition, networkProfile);
|
||||
|
||||
@@ -196,7 +199,10 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||
{
|
||||
if (isDisposing)
|
||||
{
|
||||
NetworkChange.NetworkAddressChanged -= LocalInterfaceCacheHandler;
|
||||
if (!Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
NetworkChange.NetworkAddressChanged -= LocalInterfaceCacheHandler;
|
||||
}
|
||||
|
||||
GeneralServiceManager.Remove(_generalServiceDetail.ClientId);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Services.Pm.Types;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Pm
|
||||
{
|
||||
[Service("pm:bm")]
|
||||
class IBootModeInterface : IpcService
|
||||
{
|
||||
public IBootModeInterface(ServiceCtx context) { }
|
||||
|
||||
[CommandCmif(0)]
|
||||
// GetBootMode() -> u32
|
||||
public ResultCode GetBootMode(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write((uint)BootMode.Normal);
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Ryujinx.HLE.HOS.Services.Pm.Types
|
||||
{
|
||||
enum BootMode : uint
|
||||
{
|
||||
Normal = 0,
|
||||
Maintenance = 1,
|
||||
SafeMode = 2,
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
||||
|
||||
int retryCount;
|
||||
|
||||
ulong addressSpacePageLimit = (memMgr.GetAddrSpaceSize() - size) >> 12;
|
||||
ulong addressSpacePageLimit = ((memMgr.AslrRegionEnd - memMgr.AslrRegionStart) - size) >> 12;
|
||||
|
||||
for (retryCount = 0; retryCount < MaxMapRetries; retryCount++)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
||||
{
|
||||
ulong randomOffset = (ulong)(uint)Random.Shared.Next(0, (int)addressSpacePageLimit) << 12;
|
||||
|
||||
targetAddress = memMgr.GetAddrSpaceBaseAddr() + randomOffset;
|
||||
targetAddress = memMgr.AslrRegionStart + randomOffset;
|
||||
|
||||
if (memMgr.InsideAddrSpace(targetAddress, size) && !memMgr.InsideHeapRegion(targetAddress, size) && !memMgr.InsideAliasRegion(targetAddress, size))
|
||||
{
|
||||
|
||||
@@ -244,6 +244,15 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(68)]
|
||||
// GetSerialNumber() -> buffer<nn::settings::system::SerialNumber, 0x16>
|
||||
public ResultCode GetSerialNumber(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(Encoding.ASCII.GetBytes("RYU00000000000"));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(77)]
|
||||
// GetDeviceNickName() -> buffer<nn::settings::system::DeviceNickName, 0x16>
|
||||
public ResultCode GetDeviceNickName(ServiceCtx context)
|
||||
|
||||
@@ -51,6 +51,14 @@ namespace Ryujinx.HLE.HOS.Services.Spl
|
||||
|
||||
context.ResponseData.Write(configValue);
|
||||
|
||||
if(Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
if (result == SmcResult.Success)
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
|
||||
return (ResultCode)((int)result << 9) | ResultCode.ModuleId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user