mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-08 21:38:57 +02:00
Android: Numerous fixes
* GetSerialNumber in ISystemSettingsServer * Bionic qualifiers * Revert application pool size to 3285 MB for 4 GB DRAM * Fix PPTC recompilation if mod or patch is applied
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
{
|
||||
return arrange switch
|
||||
{
|
||||
MemoryArrange.MemoryArrange4GiB => 3455 * MiB,
|
||||
MemoryArrange.MemoryArrange4GiB or
|
||||
MemoryArrange.MemoryArrange4GiBSystemDev or
|
||||
MemoryArrange.MemoryArrange6GiBAppletDev => 3285 * MiB,
|
||||
MemoryArrange.MemoryArrange4GiBAppletDev => 2048 * MiB,
|
||||
|
||||
@@ -25,7 +25,10 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||
IsAnyInternetRequestAccepted = true, // NOTE: Why not accept any internet request?
|
||||
};
|
||||
|
||||
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
||||
if (!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 (!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,
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||
using Ryujinx.HLE.HOS.Services.Spl.Types;
|
||||
@@ -51,6 +52,14 @@ namespace Ryujinx.HLE.HOS.Services.Spl
|
||||
|
||||
context.ResponseData.Write(configValue);
|
||||
|
||||
if(PlatformInfo.IsBionic)
|
||||
{
|
||||
if (result == SmcResult.Success)
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
|
||||
return (ResultCode)((int)result << 9) | ResultCode.ModuleId;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,13 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
||||
// Apply Nsos patches.
|
||||
device.Configuration.VirtualFileSystem.ModLoader.ApplyNsoPatches(programId, nsoExecutables);
|
||||
|
||||
// Don't use PTC if ExeFS files have been replaced.
|
||||
bool enablePtc = device.System.EnablePtc && !modLoadResult.Modified;
|
||||
if (!enablePtc)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Ptc, "Detected unsupported ExeFs modifications. PTC disabled.");
|
||||
}
|
||||
|
||||
string programName = "";
|
||||
|
||||
if (!isHomebrew && programId > 0x010000000000FFFF)
|
||||
@@ -114,7 +121,7 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
||||
device.System.KernelContext,
|
||||
metaLoader,
|
||||
nacpData,
|
||||
device.System.EnablePtc,
|
||||
enablePtc,
|
||||
modLoadResult.Hash,
|
||||
true,
|
||||
programName,
|
||||
|
||||
Reference in New Issue
Block a user