Android: Memory specific switches

This commit is contained in:
KeatonTheBot
2025-05-15 14:37:35 -05:00
parent 846b5b6e8a
commit 98b4ff331c
5 changed files with 46 additions and 16 deletions
@@ -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;
}