summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-12-04 07:41:21 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-12-08 14:19:05 +0100
commit0eb6c6cd836028a94260321e460871c228deee50 (patch)
tree1f32afb694eae681c5d5936efe751f0f0d3cb972 /src/core/hle
parentMerge pull request #5165 from lioncash/copy-controller (diff)
downloadyuzu-0eb6c6cd836028a94260321e460871c228deee50.tar
yuzu-0eb6c6cd836028a94260321e460871c228deee50.tar.gz
yuzu-0eb6c6cd836028a94260321e460871c228deee50.tar.bz2
yuzu-0eb6c6cd836028a94260321e460871c228deee50.tar.lz
yuzu-0eb6c6cd836028a94260321e460871c228deee50.tar.xz
yuzu-0eb6c6cd836028a94260321e460871c228deee50.tar.zst
yuzu-0eb6c6cd836028a94260321e460871c228deee50.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 6abac3f78..17ba21496 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -7,6 +7,7 @@
#include <vector>
#include "common/logging/log.h"
#include "core/core.h"
+#include "core/file_sys/common_funcs.h"
#include "core/file_sys/content_archive.h"
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/nca_metadata.h"
@@ -23,11 +24,8 @@
namespace Service::AOC {
-constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000;
-constexpr u64 DLC_BASE_TO_AOC_ID = 0x1000;
-
static bool CheckAOCTitleIDMatchesBase(u64 title_id, u64 base) {
- return (title_id & DLC_BASE_TITLE_ID_MASK) == base;
+ return FileSys::GetBaseTitleID(title_id) == base;
}
static std::vector<u64> AccumulateAOCTitleIDs(Core::System& system) {
@@ -123,11 +121,11 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
const auto& disabled = Settings::values.disabled_addons[current];
if (std::find(disabled.begin(), disabled.end(), "DLC") == disabled.end()) {
for (u64 content_id : add_on_content) {
- if ((content_id & DLC_BASE_TITLE_ID_MASK) != current) {
+ if (FileSys::GetBaseTitleID(content_id) != current) {
continue;
}
- out.push_back(static_cast<u32>(content_id & 0x7FF));
+ out.push_back(static_cast<u32>(FileSys::GetAOCID(content_id)));
}
}
@@ -169,7 +167,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
const auto res = pm.GetControlMetadata();
if (res.first == nullptr) {
- rb.Push(title_id + DLC_BASE_TO_AOC_ID);
+ rb.Push(FileSys::GetAOCBaseTitleID(title_id));
return;
}