Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
7da8e3f8
There was an error fetching the commit references. Please try again later.
Commit
7da8e3f8
authored
5 years ago
by
David Marcec
Browse files
Options
Downloads
Patches
Plain Diff
Deglobalize System: Aoc
parent
2dbfac65
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/hle/service/aoc/aoc_u.cpp
+10
-9
10 additions, 9 deletions
src/core/hle/service/aoc/aoc_u.cpp
src/core/hle/service/aoc/aoc_u.h
+3
-2
3 additions, 2 deletions
src/core/hle/service/aoc/aoc_u.h
with
13 additions
and
11 deletions
src/core/hle/service/aoc/aoc_u.cpp
+
10
−
9
View file @
7da8e3f8
...
...
@@ -29,9 +29,9 @@ static bool CheckAOCTitleIDMatchesBase(u64 title_id, u64 base) {
return
(
title_id
&
DLC_BASE_TITLE_ID_MASK
)
==
base
;
}
static
std
::
vector
<
u64
>
AccumulateAOCTitleIDs
()
{
static
std
::
vector
<
u64
>
AccumulateAOCTitleIDs
(
Core
::
System
&
system
)
{
std
::
vector
<
u64
>
add_on_content
;
const
auto
&
rcu
=
Core
::
System
::
GetInstance
()
.
GetContentProvider
();
const
auto
&
rcu
=
system
.
GetContentProvider
();
const
auto
list
=
rcu
.
ListEntriesFilter
(
FileSys
::
TitleType
::
AOC
,
FileSys
::
ContentRecordType
::
Data
);
std
::
transform
(
list
.
begin
(),
list
.
end
(),
std
::
back_inserter
(
add_on_content
),
...
...
@@ -47,7 +47,8 @@ static std::vector<u64> AccumulateAOCTitleIDs() {
return
add_on_content
;
}
AOC_U
::
AOC_U
()
:
ServiceFramework
(
"aoc:u"
),
add_on_content
(
AccumulateAOCTitleIDs
())
{
AOC_U
::
AOC_U
(
Core
::
System
&
system
)
:
ServiceFramework
(
"aoc:u"
),
add_on_content
(
AccumulateAOCTitleIDs
(
system
)),
system
(
system
)
{
// clang-format off
static
const
FunctionInfo
functions
[]
=
{
{
0
,
nullptr
,
"CountAddOnContentByApplicationId"
},
...
...
@@ -65,7 +66,7 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u"), add_on_content(AccumulateAOCTitleIDs
RegisterHandlers
(
functions
);
auto
&
kernel
=
Core
::
System
::
GetInstance
()
.
Kernel
();
auto
&
kernel
=
system
.
Kernel
();
aoc_change_event
=
Kernel
::
WritableEvent
::
CreateEventPair
(
kernel
,
Kernel
::
ResetType
::
Manual
,
"GetAddOnContentListChanged:Event"
);
}
...
...
@@ -86,7 +87,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
IPC
::
ResponseBuilder
rb
{
ctx
,
3
};
rb
.
Push
(
RESULT_SUCCESS
);
const
auto
current
=
Core
::
System
::
GetInstance
()
.
CurrentProcess
()
->
GetTitleID
();
const
auto
current
=
system
.
CurrentProcess
()
->
GetTitleID
();
const
auto
&
disabled
=
Settings
::
values
.
disabled_addons
[
current
];
if
(
std
::
find
(
disabled
.
begin
(),
disabled
.
end
(),
"DLC"
)
!=
disabled
.
end
())
{
...
...
@@ -113,7 +114,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
LOG_DEBUG
(
Service_AOC
,
"called with offset={}, count={}, process_id={}"
,
offset
,
count
,
process_id
);
const
auto
current
=
Core
::
System
::
GetInstance
()
.
CurrentProcess
()
->
GetTitleID
();
const
auto
current
=
system
.
CurrentProcess
()
->
GetTitleID
();
std
::
vector
<
u32
>
out
;
const
auto
&
disabled
=
Settings
::
values
.
disabled_addons
[
current
];
...
...
@@ -159,7 +160,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
IPC
::
ResponseBuilder
rb
{
ctx
,
4
};
rb
.
Push
(
RESULT_SUCCESS
);
const
auto
title_id
=
Core
::
System
::
GetInstance
()
.
CurrentProcess
()
->
GetTitleID
();
const
auto
title_id
=
system
.
CurrentProcess
()
->
GetTitleID
();
FileSys
::
PatchManager
pm
{
title_id
};
const
auto
res
=
pm
.
GetControlMetadata
();
...
...
@@ -196,8 +197,8 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
rb
.
PushCopyObjects
(
aoc_change_event
.
readable
);
}
void
InstallInterfaces
(
SM
::
ServiceManager
&
service_manager
)
{
std
::
make_shared
<
AOC_U
>
()
->
InstallAsService
(
service_manager
);
void
InstallInterfaces
(
SM
::
ServiceManager
&
service_manager
,
Core
::
System
&
system
)
{
std
::
make_shared
<
AOC_U
>
(
system
)
->
InstallAsService
(
service_manager
);
}
}
// namespace Service::AOC
This diff is collapsed.
Click to expand it.
src/core/hle/service/aoc/aoc_u.h
+
3
−
2
View file @
7da8e3f8
...
...
@@ -14,7 +14,7 @@ namespace Service::AOC {
class
AOC_U
final
:
public
ServiceFramework
<
AOC_U
>
{
public:
AOC_U
();
AOC_U
(
Core
::
System
&
system
);
~
AOC_U
()
override
;
private:
...
...
@@ -26,9 +26,10 @@ private:
std
::
vector
<
u64
>
add_on_content
;
Kernel
::
EventPair
aoc_change_event
;
Core
::
System
&
system
;
};
/// Registers all AOC services with the specified service manager.
void
InstallInterfaces
(
SM
::
ServiceManager
&
service_manager
);
void
InstallInterfaces
(
SM
::
ServiceManager
&
service_manager
,
Core
::
System
&
system
);
}
// namespace Service::AOC
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment