fixed spaceball button callback (x11) compatibility with original GLUT: button

numbers should start from 1, not 0.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1843 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
jtsiomb 2018-09-29 06:05:26 +00:00
parent 89c58f2256
commit 29313e5313

View File

@ -136,7 +136,8 @@ void fgSpaceballHandleXEvent(const XEvent *xev)
break; break;
case SPNAV_EVENT_BUTTON: 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; break;
default: default: