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 */