mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 19:18:57 +02:00
Replace 'Expand DRAM' option with dropdown menu
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
MemoryArrange.MemoryArrange4GiBAppletDev => 2048 * MiB,
|
||||
MemoryArrange.MemoryArrange6GiB => 4916 * MiB,
|
||||
MemoryArrange.MemoryArrange8GiB => 6964 * MiB,
|
||||
MemoryArrange.MemoryArrange12GiB => 11060 * MiB,
|
||||
_ => throw new ArgumentException($"Invalid memory arrange \"{arrange}\"."),
|
||||
};
|
||||
}
|
||||
@@ -43,7 +44,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
MemoryArrange.MemoryArrange4GiBSystemDev => 448 * MiB,
|
||||
MemoryArrange.MemoryArrange6GiB => 562 * MiB,
|
||||
MemoryArrange.MemoryArrange6GiBAppletDev => 2193 * MiB,
|
||||
MemoryArrange.MemoryArrange8GiB => 562 * MiB,
|
||||
MemoryArrange.MemoryArrange8GiB or
|
||||
MemoryArrange.MemoryArrange12GiB => 562 * MiB,
|
||||
_ => throw new ArgumentException($"Invalid memory arrange \"{arrange}\"."),
|
||||
};
|
||||
}
|
||||
@@ -71,6 +73,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
MemorySize.MemorySize4GiB => 4 * GiB,
|
||||
MemorySize.MemorySize6GiB => 6 * GiB,
|
||||
MemorySize.MemorySize8GiB => 8 * GiB,
|
||||
MemorySize.MemorySize12GiB => 12 * GiB,
|
||||
_ => throw new ArgumentException($"Invalid memory size \"{size}\"."),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,10 +3,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
enum MemoryArrange : byte
|
||||
{
|
||||
MemoryArrange4GiB,
|
||||
MemoryArrange6GiB,
|
||||
MemoryArrange8GiB,
|
||||
MemoryArrange12GiB,
|
||||
MemoryArrange4GiBAppletDev,
|
||||
MemoryArrange4GiBSystemDev,
|
||||
MemoryArrange6GiB,
|
||||
MemoryArrange6GiBAppletDev,
|
||||
MemoryArrange8GiB,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
MemorySize4GiB = 0,
|
||||
MemorySize6GiB = 1,
|
||||
MemorySize8GiB = 2,
|
||||
MemorySize12GiB = 3,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ namespace Ryujinx.HLE
|
||||
public enum MemoryConfiguration
|
||||
{
|
||||
MemoryConfiguration4GiB = 0,
|
||||
MemoryConfiguration4GiBAppletDev = 1,
|
||||
MemoryConfiguration4GiBSystemDev = 2,
|
||||
MemoryConfiguration6GiB = 3,
|
||||
MemoryConfiguration6GiBAppletDev = 4,
|
||||
MemoryConfiguration8GiB = 5,
|
||||
MemoryConfiguration6GiB = 1,
|
||||
MemoryConfiguration8GiB = 2,
|
||||
MemoryConfiguration12GiB = 3,
|
||||
MemoryConfiguration4GiBAppletDev = 4,
|
||||
MemoryConfiguration4GiBSystemDev = 5,
|
||||
MemoryConfiguration6GiBAppletDev = 6,
|
||||
}
|
||||
|
||||
static class MemoryConfigurationExtensions
|
||||
@@ -28,6 +29,7 @@ namespace Ryujinx.HLE
|
||||
MemoryConfiguration.MemoryConfiguration6GiB => MemoryArrange.MemoryArrange6GiB,
|
||||
MemoryConfiguration.MemoryConfiguration6GiBAppletDev => MemoryArrange.MemoryArrange6GiBAppletDev,
|
||||
MemoryConfiguration.MemoryConfiguration8GiB => MemoryArrange.MemoryArrange8GiB,
|
||||
MemoryConfiguration.MemoryConfiguration12GiB => MemoryArrange.MemoryArrange12GiB,
|
||||
_ => throw new AggregateException($"Invalid memory configuration \"{configuration}\"."),
|
||||
};
|
||||
}
|
||||
@@ -42,6 +44,7 @@ namespace Ryujinx.HLE
|
||||
MemoryConfiguration.MemoryConfiguration6GiB or
|
||||
MemoryConfiguration.MemoryConfiguration6GiBAppletDev => MemorySize.MemorySize6GiB,
|
||||
MemoryConfiguration.MemoryConfiguration8GiB => MemorySize.MemorySize8GiB,
|
||||
MemoryConfiguration.MemoryConfiguration12GiB => MemorySize.MemorySize12GiB,
|
||||
_ => throw new AggregateException($"Invalid memory configuration \"{configuration}\"."),
|
||||
};
|
||||
}
|
||||
@@ -56,6 +59,7 @@ namespace Ryujinx.HLE
|
||||
MemoryConfiguration.MemoryConfiguration6GiB or
|
||||
MemoryConfiguration.MemoryConfiguration6GiBAppletDev => 6 * GiB,
|
||||
MemoryConfiguration.MemoryConfiguration8GiB => 8 * GiB,
|
||||
MemoryConfiguration.MemoryConfiguration12GiB => 12 * GiB,
|
||||
_ => throw new AggregateException($"Invalid memory configuration \"{configuration}\"."),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user