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
c8b9467f
There was an error fetching the commit references. Please try again later.
Commit
c8b9467f
authored
1 year ago
by
german77
Browse files
Options
Downloads
Patches
Plain Diff
service: hid: Ensure state is correct
parent
8fb9f78e
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/core/hle/service/hid/controllers/npad.cpp
+8
-8
8 additions, 8 deletions
src/core/hle/service/hid/controllers/npad.cpp
with
8 additions
and
8 deletions
src/core/hle/service/hid/controllers/npad.cpp
+
8
−
8
View file @
c8b9467f
...
@@ -419,9 +419,17 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
...
@@ -419,9 +419,17 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
std
::
scoped_lock
lock
{
mutex
};
std
::
scoped_lock
lock
{
mutex
};
auto
&
controller
=
GetControllerFromNpadIdType
(
npad_id
);
auto
&
controller
=
GetControllerFromNpadIdType
(
npad_id
);
const
auto
controller_type
=
controller
.
device
->
GetNpadStyleIndex
();
const
auto
controller_type
=
controller
.
device
->
GetNpadStyleIndex
();
if
(
!
controller
.
device
->
IsConnected
()
&&
controller
.
is_connected
)
{
DisconnectNpad
(
npad_id
);
return
;
}
if
(
!
controller
.
device
->
IsConnected
())
{
if
(
!
controller
.
device
->
IsConnected
())
{
return
;
return
;
}
}
if
(
controller
.
device
->
IsConnected
()
&&
!
controller
.
is_connected
)
{
InitNewlyAddedController
(
npad_id
);
}
// This function is unique to yuzu for the turbo buttons and motion to work properly
// This function is unique to yuzu for the turbo buttons and motion to work properly
controller
.
device
->
StatusUpdate
();
controller
.
device
->
StatusUpdate
();
...
@@ -736,14 +744,6 @@ void Controller_NPad::SetSupportedStyleSet(Core::HID::NpadStyleTag style_set) {
...
@@ -736,14 +744,6 @@ void Controller_NPad::SetSupportedStyleSet(Core::HID::NpadStyleTag style_set) {
// Once SetSupportedStyleSet is called controllers are fully initialized
// Once SetSupportedStyleSet is called controllers are fully initialized
is_controller_initialized
=
true
;
is_controller_initialized
=
true
;
// Connect all active controllers
for
(
auto
&
controller
:
controller_data
)
{
const
auto
&
device
=
controller
.
device
;
if
(
device
->
IsConnected
())
{
AddNewControllerAt
(
device
->
GetNpadStyleIndex
(),
device
->
GetNpadIdType
());
}
}
}
}
Core
::
HID
::
NpadStyleTag
Controller_NPad
::
GetSupportedStyleSet
()
const
{
Core
::
HID
::
NpadStyleTag
Controller_NPad
::
GetSupportedStyleSet
()
const
{
...
...
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