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
be5dc68c
There was an error fetching the commit references. Please try again later.
Commit
be5dc68c
authored
5 years ago
by
FreddyFunk
Browse files
Options
Downloads
Patches
Plain Diff
fixed clang format & addressed feedback
parent
a31c6b2c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/yuzu/configuration/configure_input_player.cpp
+24
-26
24 additions, 26 deletions
src/yuzu/configuration/configure_input_player.cpp
with
24 additions
and
26 deletions
src/yuzu/configuration/configure_input_player.cpp
+
24
−
26
View file @
be5dc68c
...
@@ -245,25 +245,24 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
...
@@ -245,25 +245,24 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
button
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
button
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
connect
(
button
,
&
QPushButton
::
clicked
,
[
=
]
{
connect
(
button
,
&
QPushButton
::
clicked
,
[
=
]
{
HandleClick
(
HandleClick
(
button_map
[
button_id
],
button_map
[
button_id
],
[
=
](
Common
::
ParamPackage
params
)
{
[
=
](
Common
::
ParamPackage
params
)
{
// Workaround for ZL & ZR for analog triggers like on XBOX controllors.
// Workaround for ZL & ZR for analog triggers like on XBOX controllors.
// Analog triggers (from controllers like the XBOX controller) would not
// Analog triggers (from controllers like the XBOX controller) would not work
// work due to a different range of their signals (from 0 to 255 on
// due to a different range of their signals (from 0 to 255 on analog triggers
// analog triggers instead of -32768 to 32768 on analog joysticks). The
// instead of -32768 to 32768 on analog joysticks). The SDL driver misinterprets
// SDL driver misinterprets analog triggers as analog joysticks.
// analog triggers as analog joysticks.
// TODO: reinterpret the signal range for analog triggers to map the
// TODO: reinterpret the signal range for analog triggers to map the values
// values correctly. This is required for the correct emulation of the
// correctly. This is required for the correct emulation of the analog triggers
// analog triggers of the GameCube controller.
// of the GameCube controller.
if
(
button_id
==
Settings
::
NativeButton
::
ZL
||
if
(
button_id
==
Settings
::
NativeButton
::
ZL
||
button_id
==
Settings
::
NativeButton
::
ZR
)
{
button_id
==
Settings
::
NativeButton
::
ZR
)
{
params
.
Set
(
"direction"
,
"+"
);
params
.
Set
(
"direction"
,
"+"
);
params
.
Set
(
"threshold"
,
"0.5"
);
params
.
Set
(
"threshold"
,
"0.5"
);
}
}
buttons_param
[
button_id
]
=
std
::
move
(
params
);
buttons_param
[
button_id
]
=
params
;
},
},
InputCommon
::
Polling
::
DeviceType
::
Button
);
InputCommon
::
Polling
::
DeviceType
::
Button
);
});
});
connect
(
button
,
&
QPushButton
::
customContextMenuRequested
,
[
=
](
const
QPoint
&
menu_location
)
{
connect
(
button
,
&
QPushButton
::
customContextMenuRequested
,
[
=
](
const
QPoint
&
menu_location
)
{
QMenu
context_menu
;
QMenu
context_menu
;
...
@@ -289,13 +288,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
...
@@ -289,13 +288,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
analog_button
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
analog_button
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
connect
(
analog_button
,
&
QPushButton
::
clicked
,
[
=
]()
{
connect
(
analog_button
,
&
QPushButton
::
clicked
,
[
=
]()
{
HandleClick
(
HandleClick
(
analog_map_buttons
[
analog_id
][
sub_button_id
],
analog_map_buttons
[
analog_id
][
sub_button_id
],
[
=
](
const
Common
::
ParamPackage
&
params
)
{
[
=
](
const
Common
::
ParamPackage
&
params
)
{
SetAnalogButton
(
params
,
analogs_param
[
analog_id
],
SetAnalogButton
(
params
,
analogs_param
[
analog_id
],
analog_sub_buttons
[
sub_button_id
]);
analog_sub_buttons
[
sub_button_id
]);
},
},
InputCommon
::
Polling
::
DeviceType
::
Button
);
InputCommon
::
Polling
::
DeviceType
::
Button
);
});
});
connect
(
analog_button
,
&
QPushButton
::
customContextMenuRequested
,
connect
(
analog_button
,
&
QPushButton
::
customContextMenuRequested
,
[
=
](
const
QPoint
&
menu_location
)
{
[
=
](
const
QPoint
&
menu_location
)
{
...
...
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