PORT_ADJUSTER now accepts PORT_MINMAX as well. [Couriersud]

This commit is contained in:
Couriersud 2012-07-22 11:02:40 +00:00
parent 06a51716dc
commit d1b347c3f6
2 changed files with 2 additions and 1 deletions

View File

@ -1606,6 +1606,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, a
// analog adjuster definition // analog adjuster definition
#define PORT_ADJUSTER(_default, _name) \ #define PORT_ADJUSTER(_default, _name) \
configurer.field_alloc(IPT_ADJUSTER, (_default), 0xff, (_name)); \ configurer.field_alloc(IPT_ADJUSTER, (_default), 0xff, (_name)); \
configurer.field_set_min_max(0, 100); \
// config definition // config definition
#define PORT_CONFNAME(_mask, _default, _name) \ #define PORT_CONFNAME(_mask, _default, _name) \

View File

@ -1670,7 +1670,7 @@ static slider_state *slider_init(running_machine &machine)
if (field->type() == IPT_ADJUSTER) if (field->type() == IPT_ADJUSTER)
{ {
void *param = (void *)field; void *param = (void *)field;
*tailptr = slider_alloc(machine, field->name(), 0, field->defvalue(), 100, 1, slider_adjuster, param); *tailptr = slider_alloc(machine, field->name(), field->minval(), field->defvalue(), field->maxval(), 1, slider_adjuster, param);
tailptr = &(*tailptr)->next; tailptr = &(*tailptr)->next;
} }