summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-06-20 19:58:22 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-06-20 19:58:22 +0000
commitf77da42ef10d40ca67937af2e2b456357bc85e10 (patch)
tree1eb8c1e057387f219ffde0a959e2a17daf0050c8
parent0e8741767fc561208ca9d0f2dcd9690eb39462cd (diff)
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().
-rw-r--r--src/emu/inptport.c7
-rw-r--r--src/emu/input.c7
-rw-r--r--src/emu/input.h1
3 files changed, 5 insertions, 10 deletions
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index 92db333a104..a3ca39af306 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -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)
diff --git a/src/emu/input.c b/src/emu/input.c
index 969d6bf4107..097de87c213 100644
--- a/src/emu/input.c
+++ b/src/emu/input.c
@@ -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;
+
//**************************************************************************
diff --git a/src/emu/input.h b/src/emu/input.h
index bfe1373f575..22fb8f6d339 100644
--- a/src/emu/input.h
+++ b/src/emu/input.h
@@ -490,7 +490,6 @@ public:
// constant sequences
static const input_seq empty_seq;
- static const input_seq default_seq;
private:
// internal state