Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
OIS
Commits
21e4b332
"platforms/common/src/kernels/pme.cc" did not exist on "1f2b65da328aee0d040b9050a48636468c2cca51"
Commit
21e4b332
authored
Jul 26, 2010
by
Phillip Castaneda
Browse files
Adding joy patch - perform more reads per capture
parent
d9b8990a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
83 deletions
+86
-83
includes/linux/LinuxPrereqs.h
includes/linux/LinuxPrereqs.h
+1
-1
src/linux/LinuxJoyStickEvents.cpp
src/linux/LinuxJoyStickEvents.cpp
+85
-82
No files found.
includes/linux/LinuxPrereqs.h
View file @
21e4b332
...
...
@@ -31,7 +31,7 @@ restrictions:
#include "OISPrereqs.h"
//! Max number of elements to collect from buffered input
#define JOY_BUFFERSIZE
10
#define JOY_BUFFERSIZE
64
namespace
OIS
{
...
...
src/linux/LinuxJoyStickEvents.cpp
View file @
21e4b332
...
...
@@ -95,9 +95,11 @@ void LinuxJoyStick::capture()
//We are in non blocking mode - we just read once, and try to fill up buffer
input_event
js
[
JOY_BUFFERSIZE
];
while
(
true
)
{
int
ret
=
read
(
mJoyStick
,
&
js
,
sizeof
(
struct
input_event
)
*
JOY_BUFFERSIZE
);
if
(
ret
<
=
0
)
return
;
if
(
ret
<
0
)
break
;
//Determine how many whole events re read up
ret
/=
sizeof
(
struct
input_event
);
...
...
@@ -190,13 +192,14 @@ void LinuxJoyStick::capture()
case
EV_REL
:
//Relative Axes (Do any joystick actually have a relative axis?)
#ifdef OIS_LINUX_JOY_DEBUG
#ifdef OIS_LINUX_JOY_DEBUG
cout
<<
"
\n
Warning: Relatives axes not supported yet"
<<
endl
;
#endif
#endif
break
;
default:
break
;
}
}
}
//All axes and POVs are combined into one movement per pair per captured frame
if
(
mBuffered
&&
mListener
)
...
...
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