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
ac88d3e8
There was an error fetching the commit references. Please try again later.
Commit
ac88d3e8
authored
6 years ago
by
Zach Hilman
Browse files
Options
Downloads
Patches
Plain Diff
Narrow down filter of layout configs
parent
a353322b
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/hid/hid.cpp
+5
-9
5 additions, 9 deletions
src/core/hle/service/hid/hid.cpp
src/core/hle/service/hid/hid.h
+0
-1
0 additions, 1 deletion
src/core/hle/service/hid/hid.h
with
5 additions
and
10 deletions
src/core/hle/service/hid/hid.cpp
+
5
−
9
View file @
ac88d3e8
...
@@ -16,14 +16,6 @@
...
@@ -16,14 +16,6 @@
namespace
Service
::
HID
{
namespace
Service
::
HID
{
int
GetNumberLayoutsForController
(
size_t
controller_id
)
{
if
(
controller_id
==
Controller_Handheld
)
{
return
HID_NUM_LAYOUTS_HANDHELD
;
}
else
{
return
HID_NUM_LAYOUTS
;
}
}
// Updating period for each HID device.
// Updating period for each HID device.
// TODO(shinyquagsire23): These need better values.
// TODO(shinyquagsire23): These need better values.
constexpr
u64
pad_update_ticks
=
CoreTiming
::
BASE_CLOCK_RATE
/
10000
;
constexpr
u64
pad_update_ticks
=
CoreTiming
::
BASE_CLOCK_RATE
/
10000
;
...
@@ -91,7 +83,11 @@ private:
...
@@ -91,7 +83,11 @@ private:
controller_header
.
left_color_buttons
=
JOYCON_BUTTONS_NEON_BLUE
;
controller_header
.
left_color_buttons
=
JOYCON_BUTTONS_NEON_BLUE
;
for
(
size_t
controller
=
0
;
controller
<
mem
.
controllers
.
size
();
controller
++
)
{
for
(
size_t
controller
=
0
;
controller
<
mem
.
controllers
.
size
();
controller
++
)
{
for
(
int
index
=
0
;
index
<
GetNumberLayoutsForController
(
controller
);
index
++
)
{
for
(
int
index
=
0
;
index
<
HID_NUM_LAYOUTS
;
index
++
)
{
// TODO(DarkLordZach): Is this layout/controller config actually invalid?
if
(
controller
==
Controller_Handheld
&&
index
==
Layout_Single
)
continue
;
ControllerLayout
&
layout
=
mem
.
controllers
[
controller
].
layouts
[
index
];
ControllerLayout
&
layout
=
mem
.
controllers
[
controller
].
layouts
[
index
];
layout
.
header
.
num_entries
=
HID_NUM_ENTRIES
;
layout
.
header
.
num_entries
=
HID_NUM_ENTRIES
;
layout
.
header
.
max_entry_index
=
HID_NUM_ENTRIES
-
1
;
layout
.
header
.
max_entry_index
=
HID_NUM_ENTRIES
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/service/hid/hid.h
+
0
−
1
View file @
ac88d3e8
...
@@ -13,7 +13,6 @@ namespace Service::HID {
...
@@ -13,7 +13,6 @@ namespace Service::HID {
constexpr
u32
HID_NUM_ENTRIES
=
17
;
constexpr
u32
HID_NUM_ENTRIES
=
17
;
constexpr
u32
HID_NUM_LAYOUTS
=
7
;
constexpr
u32
HID_NUM_LAYOUTS
=
7
;
constexpr
u32
HID_NUM_LAYOUTS_HANDHELD
=
2
;
constexpr
s32
HID_JOYSTICK_MAX
=
0x8000
;
constexpr
s32
HID_JOYSTICK_MAX
=
0x8000
;
constexpr
s32
HID_JOYSTICK_MIN
=
-
0x8000
;
constexpr
s32
HID_JOYSTICK_MIN
=
-
0x8000
;
...
...
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