projects
/
freeglut
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0871c2
)
fixed spaceball button callback (x11) compatibility with original GLUT: button
author
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 29 Sep 2018 06:05:26 +0000
(06:05 +0000)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 29 Sep 2018 06:05:26 +0000
(06:05 +0000)
numbers should start from 1, not 0.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1843
7f0cb862
-5218-0410-a997-
914c9d46530a
src/x11/fg_spaceball_x11.c
patch
|
blob
|
history
diff --git
a/src/x11/fg_spaceball_x11.c
b/src/x11/fg_spaceball_x11.c
index
e6eabb2
..
e8c328a
100644
(file)
--- a/
src/x11/fg_spaceball_x11.c
+++ b/
src/x11/fg_spaceball_x11.c
@@
-136,7
+136,8
@@
void fgSpaceballHandleXEvent(const XEvent *xev)
break;
case SPNAV_EVENT_BUTTON:
- INVOKE_WCB(*spnav_win, SpaceButton, (sev.button.bnum, sev.button.press ? GLUT_DOWN : GLUT_UP));
+ /* button numbers are 1-based in glutSpaceballButtonFunc */
+ INVOKE_WCB(*spnav_win, SpaceButton, (sev.button.bnum + 1, sev.button.press ? GLUT_DOWN : GLUT_UP));
break;
default: