summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-11-14 10:01:43 -0800
committerMichael Pavone <pavone@retrodev.com>2015-11-14 10:01:43 -0800
commitf9a2e263187a70f15a9adfd1aee681b5810c1efe (patch)
treed418d4b87dadc96199747548b765db2c80a267a9
parent2e22886d47388740a5a75e5702dd63402338bb5e (diff)
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.
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 6ac4bf9..c43281f 100644
--- a/io.c
+++ b/io.c
@@ -633,6 +633,7 @@ void map_bindings(io_port *ports, keybinding *bindings, int numbindings)
&& ports[j].device.pad.gamepad_num == num
)
{
+ memset(ports[j].input, 0, sizeof(ports[j].input));
bindings[i].port = ports + j;
break;
}