comparison bindings.c @ 1804:34370330eaf3

Support controllers that have their dpad mapped to an axis
author Michael Pavone <pavone@retrodev.com>
date Tue, 26 Mar 2019 23:26:08 -0700
parents eda8df5bc74c
children 78abbabfd58d
comparison
equal deleted inserted replaced
1803:a851d36e24bb 1804:34370330eaf3
823 } 823 }
824 if (hostbutton & RENDER_DPAD_BIT) { 824 if (hostbutton & RENDER_DPAD_BIT) {
825 bind_dpad(hostpadnum, render_dpad_part(hostbutton), render_direction_part(hostbutton), bindtype, subtype_a, subtype_b); 825 bind_dpad(hostpadnum, render_dpad_part(hostbutton), render_direction_part(hostbutton), bindtype, subtype_a, subtype_b);
826 return; 826 return;
827 } else if (hostbutton & RENDER_AXIS_BIT) { 827 } else if (hostbutton & RENDER_AXIS_BIT) {
828 bind_axis(hostpadnum, render_axis_part(hostbutton), 1, bindtype, subtype_a, subtype_b); 828 bind_axis(hostpadnum, render_axis_part(hostbutton), hostbutton & RENDER_AXIS_POS, bindtype, subtype_a, subtype_b);
829 return; 829 return;
830 } 830 }
831 } 831 }
832 bind_button(hostpadnum, hostbutton, bindtype, subtype_a, subtype_b); 832 bind_button(hostpadnum, hostbutton, bindtype, subtype_a, subtype_b);
833 } 833 }