Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
315543fd
Commit
315543fd
authored
Feb 21, 2010
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: gamecon - simplify coordinate calculation for PSX
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
d38fcb96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
drivers/input/joystick/gamecon.c
drivers/input/joystick/gamecon.c
+8
-4
No files found.
drivers/input/joystick/gamecon.c
View file @
315543fd
...
...
@@ -630,8 +630,10 @@ static void gc_psx_report_one(struct gc *gc, struct input_dev *dev,
input_report_abs
(
dev
,
gc_psx_abs
[
i
+
2
],
data
[
i
+
2
]);
input_report_abs
(
dev
,
ABS_X
,
128
+
!
(
data
[
0
]
&
0x20
)
*
127
-
!
(
data
[
0
]
&
0x80
)
*
128
);
input_report_abs
(
dev
,
ABS_Y
,
128
+
!
(
data
[
0
]
&
0x40
)
*
127
-
!
(
data
[
0
]
&
0x10
)
*
128
);
input_report_abs
(
dev
,
ABS_X
,
!!
(
data
[
0
]
&
0x80
)
*
128
+
!
(
data
[
0
]
&
0x20
)
*
127
);
input_report_abs
(
dev
,
ABS_Y
,
!!
(
data
[
0
]
&
0x10
)
*
128
+
!
(
data
[
0
]
&
0x40
)
*
127
);
}
for
(
i
=
0
;
i
<
8
;
i
++
)
...
...
@@ -650,8 +652,10 @@ static void gc_psx_report_one(struct gc *gc, struct input_dev *dev,
input_report_key
(
dev
,
gc_psx_ddr_btn
[
i
],
~
data
[
0
]
&
(
0x10
<<
i
));
}
else
{
input_report_abs
(
dev
,
ABS_X
,
128
+
!
(
data
[
0
]
&
0x20
)
*
127
-
!
(
data
[
0
]
&
0x80
)
*
128
);
input_report_abs
(
dev
,
ABS_Y
,
128
+
!
(
data
[
0
]
&
0x40
)
*
127
-
!
(
data
[
0
]
&
0x10
)
*
128
);
input_report_abs
(
dev
,
ABS_X
,
!!
(
data
[
0
]
&
0x80
)
*
128
+
!
(
data
[
0
]
&
0x20
)
*
127
);
input_report_abs
(
dev
,
ABS_Y
,
!!
(
data
[
0
]
&
0x10
)
*
128
+
!
(
data
[
0
]
&
0x40
)
*
127
);
/*
* For some reason if the extra axes are left unset
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment