| 9878 | */ |
| 9879 | |
| 9880 | void setjoybuttonstate (int joy, int button, int state) |
| 9881 | { |
| 9882 | if (testmode) { |
| 9883 | inputdevice_testrecord (IDTYPE_JOYSTICK, joy, IDEV_WIDGET_BUTTON, button, state, -1); |
| 9884 | if (state < 0) |
| 9885 | inputdevice_testrecord (IDTYPE_JOYSTICK, joy, IDEV_WIDGET_BUTTON, button, 0, -1); |
| 9886 | return; |
| 9887 | } |
| 9888 | #if 0 |
| 9889 | if (ignoreoldinput (joy)) { |
| 9890 | if (state) |
| 9891 | switchdevice (&joysticks[joy], button, 1); |
| 9892 | return; |
| 9893 | } |
| 9894 | #endif |
| 9895 | setbuttonstateall (&joysticks[joy], &joysticks2[joy], button, state ? 1 : 0); |
| 9896 | } |
| 9897 | |
| 9898 | /* buttonmask = 1 = normal toggle button, 0 = mouse wheel turn or similar |
| 9899 | */ |
no test coverage detected