mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
cheat: step one item at a time and write valid xml (nw)
This commit is contained in:
parent
759275f61a
commit
b4e62ef6cc
@ -219,6 +219,7 @@ void cheat_parameter::save(emu_file &cheatfile) const
|
|||||||
// iterate over items
|
// iterate over items
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cheatfile.printf(">\n");
|
||||||
for (auto &curitem : m_itemlist)
|
for (auto &curitem : m_itemlist)
|
||||||
cheatfile.printf("\t\t\t<item value=\"%s\">%s</item>\n", curitem->value().format().c_str(), curitem->text());
|
cheatfile.printf("\t\t\t<item value=\"%s\">%s</item>\n", curitem->value().format().c_str(), curitem->text());
|
||||||
cheatfile.printf("\t\t</parameter>\n");
|
cheatfile.printf("\t\t</parameter>\n");
|
||||||
@ -300,7 +301,7 @@ bool cheat_parameter::set_next_state()
|
|||||||
if (it->get()->value() == m_value)
|
if (it->get()->value() == m_value)
|
||||||
break;
|
break;
|
||||||
if (it != m_itemlist.end() && (++it != m_itemlist.end()))
|
if (it != m_itemlist.end() && (++it != m_itemlist.end()))
|
||||||
m_value = (++it)->get()->value();
|
m_value = it->get()->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (m_value != origvalue);
|
return (m_value != origvalue);
|
||||||
|
Loading…
Reference in New Issue
Block a user