X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_spaceball_x11.c;h=e8c328a7a524f70824e3e695193cdebb5e802725;hb=0f239b79d6e1db71dece3ca2016aa7eacd81a57d;hp=e6eabb2f146ab2e13b0db49cffc8bc90d25f3828;hpb=a0871c21cb859cea6f24802b6828352a211ab102;p=freeglut diff --git a/src/x11/fg_spaceball_x11.c b/src/x11/fg_spaceball_x11.c index e6eabb2..e8c328a 100644 --- 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: