comparison io.c @ 886:fb1f11fd0692

Clear out IO port input state when setting bindings. This fixes a bug where pressing start in the menu after returning to it only worked on the second try.
author Michael Pavone <pavone@retrodev.com>
date Sat, 14 Nov 2015 10:01:43 -0800
parents 252dfd29831d
children bc127fa1f800
comparison
equal deleted inserted replaced
885:e3f5ec336432 886:fb1f11fd0692
631 if ((ports[j].device_type == IO_GAMEPAD3 631 if ((ports[j].device_type == IO_GAMEPAD3
632 || ports[j].device_type ==IO_GAMEPAD6) 632 || ports[j].device_type ==IO_GAMEPAD6)
633 && ports[j].device.pad.gamepad_num == num 633 && ports[j].device.pad.gamepad_num == num
634 ) 634 )
635 { 635 {
636 memset(ports[j].input, 0, sizeof(ports[j].input));
636 bindings[i].port = ports + j; 637 bindings[i].port = ports + j;
637 break; 638 break;
638 } 639 }
639 } 640 }
640 } 641 }