diff options
Diffstat (limited to 'plugins/cheat/cheat_xml.lua')
-rw-r--r-- | plugins/cheat/cheat_xml.lua | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/cheat/cheat_xml.lua b/plugins/cheat/cheat_xml.lua index cb849fe0b07..990e5fe64d8 100644 --- a/plugins/cheat/cheat_xml.lua +++ b/plugins/cheat/cheat_xml.lua @@ -54,22 +54,21 @@ local function xml_parse(data) return xml_table end -local cpu_spaces = {} - -for tag, device in pairs(manager:machine().devices) do - local sp - for name, space in pairs(device.spaces) do - if not sp then - sp = {} - cpu_spaces[tag] = sp - end - sp[space.index] = space.name - end -end - function xml.conv_cheat(data) local spaces, regions, output data = xml_parse(data) + local cpu_spaces = {} + + for tag, device in pairs(manager:machine().devices) do + local sp + for name, space in pairs(device.spaces) do + if not sp then + sp = {} + cpu_spaces[tag] = sp + end + sp[space.index] = space.name + end + end local function convert_expr(data) local write = false |