mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
lr: update capacity constants to reflect 12.0.0 changes
This commit is contained in:
parent
4db485083b
commit
a809e23320
1 changed files with 12 additions and 1 deletions
|
@ -25,8 +25,19 @@ namespace ams::lr {
|
||||||
private:
|
private:
|
||||||
/* Storage for RegisteredData entries by data id. */
|
/* Storage for RegisteredData entries by data id. */
|
||||||
RegisteredStorages<ncm::DataId, 0x800> m_registered_storages;
|
RegisteredStorages<ncm::DataId, 0x800> m_registered_storages;
|
||||||
|
private:
|
||||||
|
static ALWAYS_INLINE size_t GetStorageCapacity() {
|
||||||
|
const auto version = hos::GetVersion();
|
||||||
|
if (version >= hos::Version_12_0_0) {
|
||||||
|
return 0x8;
|
||||||
|
} else if (version >= hos::Version_9_0_0) {
|
||||||
|
return 0x2;
|
||||||
|
} else {
|
||||||
|
return 0x800;
|
||||||
|
}
|
||||||
|
}
|
||||||
public:
|
public:
|
||||||
AddOnContentLocationResolverImpl() : m_registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ }
|
AddOnContentLocationResolverImpl() : m_registered_storages(GetStorageCapacity()) { /* ... */ }
|
||||||
|
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id);
|
Result ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id);
|
||||||
|
|
Loading…
Reference in a new issue