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
a6ecdf42
There was an error fetching the commit references. Please try again later.
Commit
a6ecdf42
authored
4 years ago
by
Morph
Browse files
Options
Downloads
Patches
Plain Diff
applets: Rename LibraryAppletVersion to ControllerAppletVersion
parent
9efbf530
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/am/applets/controller.cpp
+13
-13
13 additions, 13 deletions
src/core/hle/service/am/applets/controller.cpp
src/core/hle/service/am/applets/controller.h
+2
-2
2 additions, 2 deletions
src/core/hle/service/am/applets/controller.h
with
15 additions
and
15 deletions
src/core/hle/service/am/applets/controller.cpp
+
13
−
13
View file @
a6ecdf42
...
@@ -62,7 +62,7 @@ void Controller::Initialize() {
...
@@ -62,7 +62,7 @@ void Controller::Initialize() {
common_args
.
play_startup_sound
,
common_args
.
size
,
common_args
.
system_tick
,
common_args
.
play_startup_sound
,
common_args
.
size
,
common_args
.
system_tick
,
common_args
.
theme_color
);
common_args
.
theme_color
);
library
_applet_version
=
Library
AppletVersion
{
common_args
.
library_version
};
controller
_applet_version
=
Controller
AppletVersion
{
common_args
.
library_version
};
const
auto
private_arg_storage
=
broker
.
PopNormalDataToApplet
();
const
auto
private_arg_storage
=
broker
.
PopNormalDataToApplet
();
ASSERT
(
private_arg_storage
!=
nullptr
);
ASSERT
(
private_arg_storage
!=
nullptr
);
...
@@ -73,7 +73,7 @@ void Controller::Initialize() {
...
@@ -73,7 +73,7 @@ void Controller::Initialize() {
std
::
memcpy
(
&
controller_private_arg
,
private_arg
.
data
(),
private_arg
.
size
());
std
::
memcpy
(
&
controller_private_arg
,
private_arg
.
data
(),
private_arg
.
size
());
ASSERT_MSG
(
controller_private_arg
.
arg_private_size
==
sizeof
(
ControllerSupportArgPrivate
),
ASSERT_MSG
(
controller_private_arg
.
arg_private_size
==
sizeof
(
ControllerSupportArgPrivate
),
"Unknown ControllerSupportArgPrivate revision={} with size={}"
,
"Unknown ControllerSupportArgPrivate revision={} with size={}"
,
library
_applet_version
,
controller_private_arg
.
arg_private_size
);
controller
_applet_version
,
controller_private_arg
.
arg_private_size
);
// Some games such as Cave Story+ set invalid values for the ControllerSupportMode.
// Some games such as Cave Story+ set invalid values for the ControllerSupportMode.
// Defer to arg_size to set the ControllerSupportMode.
// Defer to arg_size to set the ControllerSupportMode.
...
@@ -112,20 +112,20 @@ void Controller::Initialize() {
...
@@ -112,20 +112,20 @@ void Controller::Initialize() {
ASSERT
(
user_arg_storage
!=
nullptr
);
ASSERT
(
user_arg_storage
!=
nullptr
);
const
auto
&
user_arg
=
user_arg_storage
->
GetData
();
const
auto
&
user_arg
=
user_arg_storage
->
GetData
();
switch
(
library
_applet_version
)
{
switch
(
controller
_applet_version
)
{
case
Library
AppletVersion
::
Version3
:
case
Controller
AppletVersion
::
Version3
:
case
Library
AppletVersion
::
Version4
:
case
Controller
AppletVersion
::
Version4
:
case
Library
AppletVersion
::
Version5
:
case
Controller
AppletVersion
::
Version5
:
ASSERT
(
user_arg
.
size
()
==
sizeof
(
ControllerSupportArgOld
));
ASSERT
(
user_arg
.
size
()
==
sizeof
(
ControllerSupportArgOld
));
std
::
memcpy
(
&
controller_user_arg_old
,
user_arg
.
data
(),
user_arg
.
size
());
std
::
memcpy
(
&
controller_user_arg_old
,
user_arg
.
data
(),
user_arg
.
size
());
break
;
break
;
case
Library
AppletVersion
::
Version7
:
case
Controller
AppletVersion
::
Version7
:
ASSERT
(
user_arg
.
size
()
==
sizeof
(
ControllerSupportArgNew
));
ASSERT
(
user_arg
.
size
()
==
sizeof
(
ControllerSupportArgNew
));
std
::
memcpy
(
&
controller_user_arg_new
,
user_arg
.
data
(),
user_arg
.
size
());
std
::
memcpy
(
&
controller_user_arg_new
,
user_arg
.
data
(),
user_arg
.
size
());
break
;
break
;
default:
default:
UNIMPLEMENTED_MSG
(
"Unknown ControllerSupportArg revision={} with size={}"
,
UNIMPLEMENTED_MSG
(
"Unknown ControllerSupportArg revision={} with size={}"
,
library
_applet_version
,
controller_private_arg
.
arg_size
);
controller
_applet_version
,
controller_private_arg
.
arg_size
);
ASSERT
(
user_arg
.
size
()
>=
sizeof
(
ControllerSupportArgNew
));
ASSERT
(
user_arg
.
size
()
>=
sizeof
(
ControllerSupportArgNew
));
std
::
memcpy
(
&
controller_user_arg_new
,
user_arg
.
data
(),
sizeof
(
ControllerSupportArgNew
));
std
::
memcpy
(
&
controller_user_arg_new
,
user_arg
.
data
(),
sizeof
(
ControllerSupportArgNew
));
break
;
break
;
...
@@ -165,10 +165,10 @@ void Controller::Execute() {
...
@@ -165,10 +165,10 @@ void Controller::Execute() {
switch
(
controller_private_arg
.
mode
)
{
switch
(
controller_private_arg
.
mode
)
{
case
ControllerSupportMode
::
ShowControllerSupport
:
{
case
ControllerSupportMode
::
ShowControllerSupport
:
{
const
auto
parameters
=
[
this
]
{
const
auto
parameters
=
[
this
]
{
switch
(
library
_applet_version
)
{
switch
(
controller
_applet_version
)
{
case
Library
AppletVersion
::
Version3
:
case
Controller
AppletVersion
::
Version3
:
case
Library
AppletVersion
::
Version4
:
case
Controller
AppletVersion
::
Version4
:
case
Library
AppletVersion
::
Version5
:
case
Controller
AppletVersion
::
Version5
:
return
ConvertToFrontendParameters
(
return
ConvertToFrontendParameters
(
controller_private_arg
,
controller_user_arg_old
.
header
,
controller_private_arg
,
controller_user_arg_old
.
header
,
controller_user_arg_old
.
enable_explain_text
,
controller_user_arg_old
.
enable_explain_text
,
...
@@ -177,7 +177,7 @@ void Controller::Execute() {
...
@@ -177,7 +177,7 @@ void Controller::Execute() {
controller_user_arg_old
.
identification_colors
.
end
()),
controller_user_arg_old
.
identification_colors
.
end
()),
std
::
vector
<
ExplainText
>
(
controller_user_arg_old
.
explain_text
.
begin
(),
std
::
vector
<
ExplainText
>
(
controller_user_arg_old
.
explain_text
.
begin
(),
controller_user_arg_old
.
explain_text
.
end
()));
controller_user_arg_old
.
explain_text
.
end
()));
case
Library
AppletVersion
::
Version7
:
case
Controller
AppletVersion
::
Version7
:
default:
default:
return
ConvertToFrontendParameters
(
return
ConvertToFrontendParameters
(
controller_private_arg
,
controller_user_arg_new
.
header
,
controller_private_arg
,
controller_user_arg_new
.
header
,
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/service/am/applets/controller.h
+
2
−
2
View file @
a6ecdf42
...
@@ -21,7 +21,7 @@ namespace Service::AM::Applets {
...
@@ -21,7 +21,7 @@ namespace Service::AM::Applets {
using
IdentificationColor
=
std
::
array
<
u8
,
4
>
;
using
IdentificationColor
=
std
::
array
<
u8
,
4
>
;
using
ExplainText
=
std
::
array
<
char
,
0x81
>
;
using
ExplainText
=
std
::
array
<
char
,
0x81
>
;
enum
class
Library
AppletVersion
:
u32_le
{
enum
class
Controller
AppletVersion
:
u32_le
{
Version3
=
0x3
,
// 1.0.0 - 2.3.0
Version3
=
0x3
,
// 1.0.0 - 2.3.0
Version4
=
0x4
,
// 3.0.0 - 5.1.0
Version4
=
0x4
,
// 3.0.0 - 5.1.0
Version5
=
0x5
,
// 6.0.0 - 7.0.1
Version5
=
0x5
,
// 6.0.0 - 7.0.1
...
@@ -121,7 +121,7 @@ public:
...
@@ -121,7 +121,7 @@ public:
private:
private:
const
Core
::
Frontend
::
ControllerApplet
&
frontend
;
const
Core
::
Frontend
::
ControllerApplet
&
frontend
;
Library
AppletVersion
library
_applet_version
;
Controller
AppletVersion
controller
_applet_version
;
ControllerSupportArgPrivate
controller_private_arg
;
ControllerSupportArgPrivate
controller_private_arg
;
ControllerSupportArgOld
controller_user_arg_old
;
ControllerSupportArgOld
controller_user_arg_old
;
ControllerSupportArgNew
controller_user_arg_new
;
ControllerSupportArgNew
controller_user_arg_new
;
...
...
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