summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui/inputmap.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-01-28 09:20:10 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-01-28 09:20:10 +0100
commit26e7a17b6326aa5a75a6276e52cf84a94c16d7a0 (patch)
treebab4468226c59d590688e0ece892f5bfbca58736 /src/emu/ui/inputmap.c
parent13b862c4fae88f0f819c2c4416d49249e4de45b9 (diff)
Cleanups and version bumpmame0158
Diffstat (limited to 'src/emu/ui/inputmap.c')
-rw-r--r--src/emu/ui/inputmap.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c
index 7f3b7942691..4150bfc9649 100644
--- a/src/emu/ui/inputmap.c
+++ b/src/emu/ui/inputmap.c
@@ -487,7 +487,7 @@ void ui_menu_settings::handle()
if (menu_event != NULL && menu_event->itemref != NULL)
{
// reset
- if ((FPTR)menu_event->itemref == 1)
+ if ((FPTR)menu_event->itemref == 1)
{
if (menu_event->iptkey == IPT_UI_SELECT)
machine().schedule_hard_reset();
@@ -498,7 +498,7 @@ void ui_menu_settings::handle()
ioport_field *field = (ioport_field *)menu_event->itemref;
ioport_field::user_settings settings;
int changed = false;
-
+
switch (menu_event->iptkey)
{
/* if selected, reset to default value */
@@ -508,20 +508,20 @@ void ui_menu_settings::handle()
field->set_user_settings(settings);
changed = true;
break;
-
+
/* left goes to previous setting */
case IPT_UI_LEFT:
field->select_previous_setting();
changed = true;
break;
-
+
/* right goes to next setting */
case IPT_UI_RIGHT:
field->select_next_setting();
changed = true;
break;
}
-
+
/* if anything changed, rebuild the menu, trying to stay on the same field */
if (changed)
reset(UI_MENU_RESET_REMEMBER_REF);
@@ -628,7 +628,7 @@ void ui_menu_settings::populate()
}
if (type == IPT_DIPSWITCH)
custombottom = dipcount ? dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING : 0;
-
+
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
item_append("Reset", NULL, 0, (void *)1);
}
@@ -661,18 +661,18 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top,
{
const ioport_diplocation *diploc;
UINT32 selectedmask = 0;
-
+
// determine the mask of selected bits
if ((FPTR)selectedref != 1)
{
ioport_field *field = (ioport_field *)selectedref;
-
+
if (field != NULL && field->first_diplocation() != NULL)
for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next())
if (strcmp(dip->name, diploc->name()) == 0)
selectedmask |= 1 << (diploc->number() - 1);
}
-
+
// draw one switch
custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask);
y1 += (float)(DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT);
@@ -884,7 +884,7 @@ void ui_menu_analog::populate()
}
name.cpy(field->name());
-
+
/* allocate a data item for tracking what this menu item refers to */
data = (analog_item_data *)m_pool_alloc(sizeof(*data));
data->field = field;