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:
parent
89c58f2256
commit
29313e5313
@ -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:
|
||||||
|
Reference in New Issue
Block a user