MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / setjoybuttonstate

Function setjoybuttonstate

src/inputdevice.cpp:9880–9896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9878*/
9879
9880void 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*/

Callers 5

inject_buttonsFunction · 0.85
read_controller_buttonFunction · 0.85
read_joystick_hatFunction · 0.85
poll_inputFunction · 0.85

Calls 3

inputdevice_testrecordFunction · 0.85
switchdeviceFunction · 0.85
setbuttonstateallFunction · 0.85

Tested by

no test coverage detected