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
510c7d29
There was an error fetching the commit references. Please try again later.
Commit
510c7d29
authored
3 years ago
by
german77
Committed by
Narr the Reg
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
core/frontend: Update applets
parent
dd62a018
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/frontend/applets/controller.cpp
+14
-9
14 additions, 9 deletions
src/core/frontend/applets/controller.cpp
src/core/hle/service/am/applets/applet_controller.cpp
+1
-1
1 addition, 1 deletion
src/core/hle/service/am/applets/applet_controller.cpp
with
15 additions
and
10 deletions
src/core/frontend/applets/controller.cpp
+
14
−
9
View file @
510c7d29
...
...
@@ -49,26 +49,31 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb
// Connect controllers based on the following priority list from highest to lowest priority:
// Pro Controller -> Dual Joycons -> Left Joycon/Right Joycon -> Handheld
if
(
parameters
.
allow_pro_controller
)
{
npad
.
AddNewControllerAt
(
npad
.
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
ProController
),
index
);
npad
.
AddNewControllerAt
(
Core
::
HID
::
EmulatedController
::
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
ProController
),
index
);
}
else
if
(
parameters
.
allow_dual_joycons
)
{
npad
.
AddNewControllerAt
(
npad
.
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
DualJoyconDetached
),
index
);
npad
.
AddNewControllerAt
(
Core
::
HID
::
EmulatedController
::
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
DualJoyconDetached
),
index
);
}
else
if
(
parameters
.
allow_left_joycon
&&
parameters
.
allow_right_joycon
)
{
// Assign left joycons to even player indices and right joycons to odd player indices.
// We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and
// a right Joycon for Player 2 in 2 Player Assist mode.
if
(
index
%
2
==
0
)
{
npad
.
AddNewControllerAt
(
npad
.
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
LeftJoycon
),
index
);
npad
.
AddNewControllerAt
(
Core
::
HID
::
EmulatedController
::
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
LeftJoycon
),
index
);
}
else
{
npad
.
AddNewControllerAt
(
npad
.
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
RightJoycon
),
index
);
npad
.
AddNewControllerAt
(
Core
::
HID
::
EmulatedController
::
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
RightJoycon
),
index
);
}
}
else
if
(
index
==
0
&&
parameters
.
enable_single_mode
&&
parameters
.
allow_handheld
&&
!
Settings
::
values
.
use_docked_mode
.
GetValue
())
{
// We should *never* reach here under any normal circumstances.
npad
.
AddNewControllerAt
(
npad
.
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
Handheld
),
npad
.
AddNewControllerAt
(
Core
::
HID
::
EmulatedController
::
MapSettingsTypeToNPad
(
Settings
::
ControllerType
::
Handheld
),
index
);
}
else
{
UNREACHABLE_MSG
(
"Unable to add a new controller based on the given parameters!"
);
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/service/am/applets/applet_controller.cpp
+
1
−
1
View file @
510c7d29
...
...
@@ -25,7 +25,7 @@ namespace Service::AM::Applets {
static
Core
::
Frontend
::
ControllerParameters
ConvertToFrontendParameters
(
ControllerSupportArgPrivate
private_arg
,
ControllerSupportArgHeader
header
,
bool
enable_text
,
std
::
vector
<
IdentificationColor
>
identification_colors
,
std
::
vector
<
ExplainText
>
text
)
{
HID
::
Controller_NPad
::
NpadStyle
Set
npad_style_set
;
Core
::
HID
::
NpadStyle
Tag
npad_style_set
;
npad_style_set
.
raw
=
private_arg
.
style_set
;
return
{
...
...
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