Changed Player Input menu to be based off of sortorder instead of item->ref.

Currently an analog control creates the axis;inc;dec menu items all under the same ref.  This means the UI still thinks it is adding items when you move between any of the three for the same control.  You have to move to a different control before sequences are no longer added to that control.

Harder to describe then to try.  Try the current code.  Map an INC button, move to DEC and map a button.  Go back to INC and the old value is not cleared first.
This commit is contained in:
Derrick Renaud 2009-04-13 03:42:53 +00:00
parent 7242193ea0
commit ecac25b281

View File

@ -190,7 +190,7 @@ struct _settings_menu_state
typedef struct _input_menu_state input_menu_state;
struct _input_menu_state
{
const void * lastref;
UINT16 last_sortorder;
const void * pollingref;
input_item_data * pollingitem;
UINT8 record_next;
@ -1779,7 +1779,7 @@ static void menu_input_common(running_machine *machine, ui_menu *menu, void *par
/* an item was selected: begin polling */
case IPT_UI_SELECT:
menustate->pollingitem = item;
menustate->lastref = item->ref;
menustate->last_sortorder = item->sortorder;
menustate->starting_seq = item->seq;
input_seq_poll_start((item->type == INPUT_TYPE_ANALOG) ? ITEM_CLASS_ABSOLUTE : ITEM_CLASS_SWITCH, menustate->record_next ? &item->seq : NULL);
invalidate = TRUE;
@ -1794,9 +1794,9 @@ static void menu_input_common(running_machine *machine, ui_menu *menu, void *par
}
/* if the selection changed, reset the "record next" flag */
if (item->ref != menustate->lastref)
if (item->sortorder != menustate->last_sortorder)
menustate->record_next = FALSE;
menustate->lastref = item->ref;
menustate->last_sortorder = item->sortorder;
}
/* if the sequence changed, update it */