summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-11 03:52:19 +0100
committerGitHub <noreply@github.com>2018-12-11 03:52:19 +0100
commit2c45c6d23431021efb1053abcb40064256aac338 (patch)
treeedd00a30fa32460e8158992d53768038e83141dc /src/core/hle/service
parentMerge pull request #1887 from FearlessTobi/port-4476 (diff)
parentqt: Add Properties menu to game list right-click (diff)
downloadyuzu-2c45c6d23431021efb1053abcb40064256aac338.tar
yuzu-2c45c6d23431021efb1053abcb40064256aac338.tar.gz
yuzu-2c45c6d23431021efb1053abcb40064256aac338.tar.bz2
yuzu-2c45c6d23431021efb1053abcb40064256aac338.tar.lz
yuzu-2c45c6d23431021efb1053abcb40064256aac338.tar.xz
yuzu-2c45c6d23431021efb1053abcb40064256aac338.tar.zst
yuzu-2c45c6d23431021efb1053abcb40064256aac338.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 0417fdb92..b506bc3dd 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -20,6 +20,7 @@
#include "core/hle/service/aoc/aoc_u.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/loader.h"
+#include "core/settings.h"
namespace Service::AOC {
@@ -76,6 +77,13 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
const auto current = Core::System::GetInstance().CurrentProcess()->GetTitleID();
+
+ const auto& disabled = Settings::values.disabled_addons[current];
+ if (std::find(disabled.begin(), disabled.end(), "DLC") != disabled.end()) {
+ rb.Push<u32>(0);
+ return;
+ }
+
rb.Push<u32>(static_cast<u32>(
std::count_if(add_on_content.begin(), add_on_content.end(),
[current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); })));
@@ -96,6 +104,10 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
out.push_back(static_cast<u32>(add_on_content[i] & 0x7FF));
}
+ const auto& disabled = Settings::values.disabled_addons[current];
+ if (std::find(disabled.begin(), disabled.end(), "DLC") != disabled.end())
+ out = {};
+
if (out.size() < offset) {
IPC::ResponseBuilder rb{ctx, 2};
// TODO(DarkLordZach): Find the correct error code.