mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
Guess at a fix for clickable artwork.
This commit is contained in:
parent
e07e03d45d
commit
a4d175be28
@ -973,9 +973,9 @@ void input_port_list_init(device_t &device, ioport_list &portlist, astring &erro
|
||||
mask on the tagged port
|
||||
-------------------------------------------------*/
|
||||
|
||||
const input_field_config *input_field_by_tag_and_mask(const ioport_list &portlist, const char *tag, input_port_value mask)
|
||||
const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask)
|
||||
{
|
||||
const input_port_config *port = portlist.find(tag);
|
||||
const input_port_config *port = machine.port(tag);
|
||||
|
||||
/* if we got the port, look for the field */
|
||||
if (port != NULL)
|
||||
@ -2432,7 +2432,7 @@ g_profiler.start(PROFILER_INPUT);
|
||||
input_port_value mask;
|
||||
float x, y;
|
||||
if (mouse_target->map_point_input(mouse_target_x, mouse_target_y, tag, mask, x, y))
|
||||
mouse_field = input_field_by_tag_and_mask(machine.m_portlist, tag, mask);
|
||||
mouse_field = input_field_by_tag_and_mask(machine, tag, mask);
|
||||
}
|
||||
|
||||
/* loop over all input ports */
|
||||
|
@ -1253,7 +1253,7 @@ time_t input_port_init(running_machine &machine);
|
||||
void input_port_list_init(device_t &device, ioport_list &portlist, astring &errorbuf);
|
||||
|
||||
/* return the field that matches the given tag and mask */
|
||||
const input_field_config *input_field_by_tag_and_mask(const ioport_list &portlist, const char *tag, input_port_value mask);
|
||||
const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask);
|
||||
|
||||
|
||||
|
||||
|
@ -1914,7 +1914,7 @@ int layout_view::item::state() const
|
||||
// if configured to an input, fetch the input value
|
||||
else if (m_input_tag[0] != 0)
|
||||
{
|
||||
const input_field_config *field = input_field_by_tag_and_mask(m_element->machine().m_portlist, m_input_tag, m_input_mask);
|
||||
const input_field_config *field = input_field_by_tag_and_mask(m_element->machine(), m_input_tag, m_input_mask);
|
||||
if (field != NULL)
|
||||
state = ((input_port_read_safe(m_element->machine(), m_input_tag, 0) ^ field->defvalue) & m_input_mask) ? 1 : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user