summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2008-03-12 01:58:49 +0000
committer Nathan Woods <npwoods@mess.org>2008-03-12 01:58:49 +0000
commit61b009597e9083f88940b42bbce2a24faa2a2ca3 (patch)
tree8e420bd5b70c22c875b998e6dfde0805f102971b
parent86b798b37a6cbdb875df3dae4a2d0c3256951d32 (diff)
Fixing MESS-specific category tokenization
-rw-r--r--src/emu/inptport.c6
-rw-r--r--src/emu/inptport.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index acf1f862fa7..d428032bb9e 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -1984,6 +1984,9 @@ static void input_port_detokenize(input_port_init_params *param, const input_por
while (entrytype != INPUT_TOKEN_END)
{
UINT32 mask, defval, type, val;
+#ifdef MESS
+ UINT16 category;
+#endif /* MESS */
/* unpack the token from the first entry */
TOKEN_GET_UINT32_UNPACK1(ipt, entrytype, 8);
@@ -2245,10 +2248,11 @@ static void input_port_detokenize(input_port_init_params *param, const input_por
case INPUT_TOKEN_CATEGORY_SETTING:
TOKEN_UNGET_UINT32(ipt);
- TOKEN_GET_UINT64_UNPACK2(ipt, entrytype, 8, defval, 32);
+ TOKEN_GET_UINT64_UNPACK3(ipt, entrytype, 8, defval, 32, category, 16);
port = input_port_initialize(param, IPT_CATEGORY_SETTING, modify_tag, 0, defval);
seq_index[0] = seq_index[1] = seq_index[2] = 0;
port->name = input_port_string_from_token(*ipt++);
+ port->category = category;
break;
#endif /* MESS */
diff --git a/src/emu/inptport.h b/src/emu/inptport.h
index 67f77341d2a..2250586d985 100644
--- a/src/emu/inptport.h
+++ b/src/emu/inptport.h
@@ -849,7 +849,7 @@ struct _ext_inp_header
TOKEN_STRING(_name),
#define PORT_CATEGORY_ITEM(_default,_name,_category) \
- TOKEN_UINT64_PACK3(INPUT_TOKEN_CATEGORY_SETTING, 8, _default, 32, _category, 32), \
+ TOKEN_UINT64_PACK3(INPUT_TOKEN_CATEGORY_SETTING, 8, _default, 32, _category, 16), \
TOKEN_STRING(_name),
#endif /* MESS */