mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
Android: Memory specific switches
This commit is contained in:
@@ -89,6 +89,9 @@ namespace Ryujinx.Memory
|
||||
[LibraryImport("libc", SetLastError = true)]
|
||||
public static partial int shm_unlink(IntPtr name);
|
||||
|
||||
[DllImport("android")]
|
||||
internal static extern int ASharedMemory_create(IntPtr name, nuint size);
|
||||
|
||||
private static int MmapFlagsToSystemFlags(MmapFlags flags)
|
||||
{
|
||||
int result = 0;
|
||||
@@ -110,7 +113,7 @@ namespace Ryujinx.Memory
|
||||
|
||||
if (flags.HasFlag(MmapFlags.MAP_ANONYMOUS))
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_ANONYMOUS_LINUX_GENERIC;
|
||||
}
|
||||
@@ -126,7 +129,7 @@ namespace Ryujinx.Memory
|
||||
|
||||
if (flags.HasFlag(MmapFlags.MAP_NORESERVE))
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_NORESERVE_LINUX_GENERIC;
|
||||
}
|
||||
@@ -142,7 +145,7 @@ namespace Ryujinx.Memory
|
||||
|
||||
if (flags.HasFlag(MmapFlags.MAP_UNLOCKED))
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_UNLOCKED_LINUX_GENERIC;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user