diff --git a/libraries/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp b/libraries/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp index 2b033f668..6f96ed724 100644 --- a/libraries/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp +++ b/libraries/libstratosphere/source/lr/lr_add_on_content_location_resolver_impl.hpp @@ -25,8 +25,19 @@ namespace ams::lr { private: /* Storage for RegisteredData entries by data id. */ RegisteredStorages 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: - AddOnContentLocationResolverImpl() : m_registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ } + AddOnContentLocationResolverImpl() : m_registered_storages(GetStorageCapacity()) { /* ... */ } /* Actual commands. */ Result ResolveAddOnContentPath(sf::Out out, ncm::DataId id);