[hatari-devel] Joystick jump/space setting

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

Looking at joystick handling code in joy.c...

Although "bEnableJumpOnFire2" option is in the config file for all the joysticks, code seems to respect it only for Joystick 1, why?

-----------------------------------------------
/* Enable PC Joystick button 2 to mimic space bar (For XenonII, Flying Shark etc...) */ if (nStJoyId == JOYID_JOYSTICK1 && (JoyReading.Buttons & JOYREADING_BUTTON2))
                {
if (ConfigureParams.Joysticks.Joy[nStJoyId].bEnableJumpOnFire2)
                        {
/* If "Jump on Button 2" is enabled, PC Joystick button 2 acts as "ST Joystick up" */
                                nData |= ATARIJOY_BITMASK_UP;
                        } else {
/* If "Jump on Button 2" is not enabled, PC Joystick button 2 acts as pressing SPACE on the ST keyboard */ /* Only press 'space bar' if not in NULL state */
                                if (!JoystickSpaceBar)
                                {
/* Press, ikbd will send packets and de-press */ JoystickSpaceBar = JOYSTICK_SPACE_DOWN;
                                }
                        }
                }
-----------------------------------------------


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/