summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-04-13 00:48:00 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-04-13 00:48:00 +0000
commita97a3f416fd1ac4d87899e19b832fbeed336d297 (patch)
tree2aa5cade9172abf4df9b135a06bc4d5269b11041
parentaa53f5fd346e4d972a010ee38a52ffa1d97298c0 (diff)
Reverted to older behavior for how modified input port fields are handled.
The originally intended behavior is that a new field that intersected a previous field would completely wipe out the original field. Recently a change was made that changed the behavior to only remove a portion of the bits from the original field. This is actually problematic behavior, so the original behavior was restored. Currently I put this behind a compile-time define until we see that we haven't come to rely on the newer behavior.
-rw-r--r--src/emu/inptport.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index cb7b1d67de0..5d55b8f5c31 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -108,6 +108,12 @@
#endif /* MESS */
+/* temporary: set this to 1 to enable the originally defined behavior that
+ a field specified via PORT_MODIFY which intersects a previously-defined
+ field completely wipes out the previous definition */
+#define INPUT_PORT_OVERRIDE_FULLY_NUKES_PREVIOUS 1
+
+
/***************************************************************************
CONSTANTS
***************************************************************************/
@@ -3066,7 +3072,7 @@ static void field_config_insert(input_field_config *field, input_port_value *dis
config->mask &= ~field->mask;
/* if the new entry fully overrides the previous one, we nuke */
- if (config->mask == 0)
+ if (INPUT_PORT_OVERRIDE_FULLY_NUKES_PREVIOUS || config->mask == 0)
{
field_config_free((input_field_config **)scanfieldptr);
scanfieldnextptr = scanfieldptr;