mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-13 23:46:40 +00:00
loader: correct anti-downgrade tables for new version scheme
This commit is contained in:
parent
0e289461bb
commit
17b6bcfd37
1 changed files with 14 additions and 21 deletions
|
@ -94,27 +94,20 @@ namespace ams::ldr {
|
||||||
#ifdef LDR_VALIDATE_PROCESS_VERSION
|
#ifdef LDR_VALIDATE_PROCESS_VERSION
|
||||||
const MinimumProgramVersion *entries = nullptr;
|
const MinimumProgramVersion *entries = nullptr;
|
||||||
size_t num_entries = 0;
|
size_t num_entries = 0;
|
||||||
switch (hos::GetVersion()) {
|
|
||||||
case hos::Version_8_1_0:
|
const auto hos_version = hos::GetVersion();
|
||||||
entries = g_MinimumProgramVersions810;
|
if (hos_version >= hos::Version_10_0_0) {
|
||||||
num_entries = g_MinimumProgramVersionsCount810;
|
|
||||||
break;
|
|
||||||
case hos::Version_9_0_0:
|
|
||||||
entries = g_MinimumProgramVersions900;
|
|
||||||
num_entries = g_MinimumProgramVersionsCount900;
|
|
||||||
break;
|
|
||||||
case hos::Version_9_1_0:
|
|
||||||
entries = g_MinimumProgramVersions910;
|
|
||||||
num_entries = g_MinimumProgramVersionsCount910;
|
|
||||||
break;
|
|
||||||
case hos::Version_10_0_0:
|
|
||||||
entries = g_MinimumProgramVersions1000;
|
entries = g_MinimumProgramVersions1000;
|
||||||
num_entries = g_MinimumProgramVersionsCount1000;
|
num_entries = g_MinimumProgramVersionsCount1000;
|
||||||
break;
|
} else if (hos_version >= hos::Version_9_1_0) {
|
||||||
default:
|
entries = g_MinimumProgramVersions910;
|
||||||
entries = nullptr;
|
num_entries = g_MinimumProgramVersionsCount910;
|
||||||
num_entries = 0;
|
} else if (hos_version >= hos::Version_9_0_0) {
|
||||||
break;
|
entries = g_MinimumProgramVersions900;
|
||||||
|
num_entries = g_MinimumProgramVersionsCount900;
|
||||||
|
} else if (hos_version >= hos::Version_8_1_0) {
|
||||||
|
entries = g_MinimumProgramVersions810;
|
||||||
|
num_entries = g_MinimumProgramVersionsCount810;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < num_entries; i++) {
|
for (size_t i = 0; i < num_entries; i++) {
|
||||||
|
|
Loading…
Reference in a new issue