mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 22:45:17 -04:00
set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+ (#1391)
* set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+ * set.mitm: add value meaning comment for usb!usb30_force_enabled * loader: pretend to be polite about patch ordering
This commit is contained in:
parent
c9015581ca
commit
a6729171d3
14 changed files with 205 additions and 24 deletions
|
@ -307,6 +307,10 @@ namespace ams::boot2 {
|
|||
});
|
||||
}
|
||||
|
||||
bool IsUsbRequiredToMountSdCard() {
|
||||
return hos::GetVersion() >= hos::Version_9_0_0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Boot2 API. */
|
||||
|
@ -347,8 +351,10 @@ namespace ams::boot2 {
|
|||
/* Launch pcv. */
|
||||
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Pcv, ncm::StorageId::BuiltInSystem), 0);
|
||||
|
||||
/* Launch usb. */
|
||||
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
|
||||
/* On 9.0.0+, FS depends on the USB sysmodule having been launched in order to mount the SD card. */
|
||||
if (IsUsbRequiredToMountSdCard()) {
|
||||
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for the SD card required services to be ready. */
|
||||
|
@ -371,6 +377,11 @@ namespace ams::boot2 {
|
|||
void LaunchPostSdCardBootPrograms() {
|
||||
/* This code is normally run by boot2. */
|
||||
|
||||
/* Launch the usb system module, if we haven't already. */
|
||||
if (!IsUsbRequiredToMountSdCard()) {
|
||||
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
|
||||
}
|
||||
|
||||
/* Find out whether we are maintenance mode. */
|
||||
const bool maintenance = IsMaintenanceMode();
|
||||
if (maintenance) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue