mirror of
https://github.com/libretro/mame2016-libretro.git
synced 2024-11-27 02:30:46 +00:00
plugins/cheat*: indent the output (nw)
This commit is contained in:
parent
7e394b5dbe
commit
6bbd290d31
@ -8,4 +8,4 @@ function readAll(file)
|
||||
return content
|
||||
end
|
||||
|
||||
print(json.stringify(xml.conv_cheat(readAll(arg[1]))))
|
||||
print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true}))
|
||||
|
@ -477,7 +477,7 @@ function cheat.startplugin()
|
||||
cheats = load_cheats()
|
||||
local json = require("json")
|
||||
local file = io.open(manager:machine():options().entries.cheatpath:value() .. "/output.json", "w")
|
||||
file:write(json.stringify(cheats))
|
||||
file:write(json.stringify(cheats, {indent = true}))
|
||||
file:close()
|
||||
for num, cheat in pairs(cheats) do
|
||||
parse_cheat(cheat)
|
||||
|
@ -518,7 +518,7 @@ function cheatfind.startplugin()
|
||||
local filename = string.format("%s/%s_%08X_cheat", manager:machine():options().entries.cheatpath:value(), emu.romname(), match.addr)
|
||||
local json = require("json")
|
||||
local file = io.open(filename .. ".json", "w")
|
||||
file:write(json.stringify({[1] = cheat}))
|
||||
file:write(json.stringify({[1] = cheat}, {indent = true}))
|
||||
file:close()
|
||||
file = io.open(filename .. ".xml", "w")
|
||||
file:write(xmlcheat)
|
||||
|
Loading…
Reference in New Issue
Block a user