comparison bindings.c @ 1842:49f65d240299 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sun, 14 Apr 2019 23:38:02 -0700
parents 78abbabfd58d
children 30f2821ffd65
comparison
equal deleted inserted replaced
1787:0c6d07f91346 1842:49f65d240299
814 hostbutton = render_translate_input_name(hostpadnum, key, 0); 814 hostbutton = render_translate_input_name(hostpadnum, key, 0);
815 if (hostbutton < 0) { 815 if (hostbutton < 0) {
816 if (hostbutton == RENDER_INVALID_NAME) { 816 if (hostbutton == RENDER_INVALID_NAME) {
817 warning("%s is not a valid gamepad input name\n", key); 817 warning("%s is not a valid gamepad input name\n", key);
818 } else if (hostbutton == RENDER_NOT_MAPPED && hostpadnum != map_warning_pad) { 818 } else if (hostbutton == RENDER_NOT_MAPPED && hostpadnum != map_warning_pad) {
819 warning("No SDL 2 mapping exists for input %s on gamepad %d\n", key, hostpadnum); 819 debug_message("No SDL 2 mapping exists for input %s on gamepad %d\n", key, hostpadnum);
820 map_warning_pad = hostpadnum; 820 map_warning_pad = hostpadnum;
821 } 821 }
822 return; 822 return;
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 }
861 axis = render_translate_input_name(hostpadnum, key, 1); 861 axis = render_translate_input_name(hostpadnum, key, 1);
862 if (axis < 0) { 862 if (axis < 0) {
863 if (axis == RENDER_INVALID_NAME) { 863 if (axis == RENDER_INVALID_NAME) {
864 warning("%s is not a valid gamepad input name\n", key); 864 warning("%s is not a valid gamepad input name\n", key);
865 } else if (axis == RENDER_NOT_MAPPED && hostpadnum != map_warning_pad) { 865 } else if (axis == RENDER_NOT_MAPPED && hostpadnum != map_warning_pad) {
866 warning("No SDL 2 mapping exists for input %s on gamepad %d\n", key, hostpadnum); 866 debug_message("No SDL 2 mapping exists for input %s on gamepad %d\n", key, hostpadnum);
867 map_warning_pad = hostpadnum; 867 map_warning_pad = hostpadnum;
868 } 868 }
869 goto done; 869 goto done;
870 } 870 }
871 if (axis & RENDER_DPAD_BIT) { 871 if (axis & RENDER_DPAD_BIT) {