mirror of
https://github.com/holub/mame
synced 2025-05-06 22:35:43 +03:00
Death by static initialization order. Fixed declaration order at the
top of input.c. Removed default_seq since all uses of it are covered by is_default() and set_default().
This commit is contained in:
parent
0e8741767f
commit
f77da42ef1
@ -1080,9 +1080,8 @@ void input_field_set_user_settings(const input_field_config *field, const input_
|
||||
for (seqtype = 0; seqtype < ARRAY_LENGTH(settings->seq); seqtype++)
|
||||
{
|
||||
const input_seq &defseq = input_type_seq(field->machine(), field->type, field->player, (input_seq_type)seqtype);
|
||||
// TODO: find what the default_seq/ITEM_ID_SEQ_DEFAULT is supposed to do, besides crashing mame
|
||||
if (false && defseq == settings->seq[seqtype])
|
||||
field->state->seq[seqtype] = input_seq::default_seq;
|
||||
if (defseq == settings->seq[seqtype])
|
||||
field->state->seq[seqtype].set_default();
|
||||
else
|
||||
field->state->seq[seqtype] = settings->seq[seqtype];
|
||||
}
|
||||
@ -4906,8 +4905,6 @@ input_type_entry::input_type_entry(UINT32 _type, ioport_group _group, int _playe
|
||||
m_next(NULL)
|
||||
{
|
||||
defseq[SEQ_TYPE_STANDARD] = seq[SEQ_TYPE_STANDARD] = standard;
|
||||
defseq[SEQ_TYPE_INCREMENT] = seq[SEQ_TYPE_INCREMENT] = input_seq::empty_seq;
|
||||
defseq[SEQ_TYPE_DECREMENT] = seq[SEQ_TYPE_DECREMENT] = input_seq::empty_seq;
|
||||
}
|
||||
|
||||
input_type_entry::input_type_entry(UINT32 _type, ioport_group _group, int _player, const char *_token, const char *_name, input_seq standard, input_seq decrement, input_seq increment)
|
||||
|
@ -59,16 +59,15 @@
|
||||
// invalid memory value for axis polling
|
||||
const INT32 INVALID_AXIS_VALUE = 0x7fffffff;
|
||||
|
||||
// constant sequences
|
||||
const input_seq input_seq::empty_seq;
|
||||
const input_seq input_seq::default_seq(input_seq::default_code);
|
||||
|
||||
// additional expanded input codes for sequences
|
||||
const input_code input_seq::end_code(DEVICE_CLASS_INTERNAL, 0, ITEM_CLASS_INVALID, ITEM_MODIFIER_NONE, ITEM_ID_SEQ_END);
|
||||
const input_code input_seq::default_code(DEVICE_CLASS_INTERNAL, 0, ITEM_CLASS_INVALID, ITEM_MODIFIER_NONE, ITEM_ID_SEQ_DEFAULT);
|
||||
const input_code input_seq::not_code(DEVICE_CLASS_INTERNAL, 0, ITEM_CLASS_INVALID, ITEM_MODIFIER_NONE, ITEM_ID_SEQ_NOT);
|
||||
const input_code input_seq::or_code(DEVICE_CLASS_INTERNAL, 0, ITEM_CLASS_INVALID, ITEM_MODIFIER_NONE, ITEM_ID_SEQ_OR);
|
||||
|
||||
// constant sequences
|
||||
const input_seq input_seq::empty_seq;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -490,7 +490,6 @@ public:
|
||||
|
||||
// constant sequences
|
||||
static const input_seq empty_seq;
|
||||
static const input_seq default_seq;
|
||||
|
||||
private:
|
||||
// internal state
|
||||
|
Loading…
Reference in New Issue
Block a user