Fixed 1.0.0 booting

This commit is contained in:
Adubbz 2019-08-10 17:01:24 +10:00
parent 85e36522e4
commit da0a293f38

View File

@ -347,6 +347,11 @@ namespace sts::ncm::impl {
auto content_storage = entry->content_storage;
if (!content_storage) {
/* 1.0.0 activates content storages as soon as they are opened. */
if (GetRuntimeFirmwareVersion() == FirmwareVersion_100) {
R_TRY(ActivateContentStorage(storage_id));
content_storage = entry->content_storage;
} else {
switch (storage_id) {
case StorageId::GameCard:
return ResultNcmGameCardContentStorageNotActive;
@ -364,6 +369,7 @@ namespace sts::ncm::impl {
return ResultNcmUnknownContentStorageNotActive;
}
}
}
*out = std::move(content_storage);
return ResultSuccess;
@ -563,6 +569,11 @@ namespace sts::ncm::impl {
std::shared_ptr<IContentMetaDatabase> content_meta_db = entry->content_meta_database;
if (!content_meta_db) {
/* 1.0.0 activates content meta dbs as soon as they are opened. */
if (GetRuntimeFirmwareVersion() == FirmwareVersion_100) {
R_TRY(ActivateContentMetaDatabase(storage_id));
content_meta_db = entry->content_meta_database;
} else {
switch (storage_id) {
case StorageId::GameCard:
return ResultNcmGameCardContentMetaDatabaseNotActive;
@ -580,6 +591,7 @@ namespace sts::ncm::impl {
return ResultNcmUnknownContentMetaDatabaseNotActive;
}
}
}
*out = std::move(content_meta_db);
return ResultSuccess;