raybob's picture

Joystick button events aren't working?

I have this inside my main onload function:

            if (this.Joysticks.Count > 0) { 
 
                this.Joysticks[0].ButtonDown += (object sender, JoystickButtonEventArgs buttonEvent) =>
                {
                    Application.Exit();
                    MessageBox.Show("AHHH!");
                };
 
                MessageBox.Show(this.Joysticks[0].Description); 
            }

The description is correct: a joystick with 13 buttons and 6 axis, but whenever I press a button, the event is not fired.

What am I doing wrong, or is this a problem with OpenTK?

Thanks!