diff 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
line wrap: on
line diff
--- a/bindings.c	Tue Mar 26 22:34:41 2019 -0700
+++ b/bindings.c	Tue Mar 26 23:26:08 2019 -0700
@@ -825,7 +825,7 @@
 			bind_dpad(hostpadnum, render_dpad_part(hostbutton), render_direction_part(hostbutton), bindtype, subtype_a, subtype_b);
 			return;
 		} else if (hostbutton & RENDER_AXIS_BIT) {
-			bind_axis(hostpadnum, render_axis_part(hostbutton), 1, bindtype, subtype_a, subtype_b);
+			bind_axis(hostpadnum, render_axis_part(hostbutton), hostbutton & RENDER_AXIS_POS, bindtype, subtype_a, subtype_b);
 			return;
 		}
 	}