diff options
author | cracyc <cracyc@users.noreply.github.com> | 2016-04-06 21:40:49 -0500 |
---|---|---|
committer | cracyc <cracyc@users.noreply.github.com> | 2016-04-06 21:40:49 -0500 |
commit | dc885b1996a0f678d456d18cf54f03d06571bbf5 (patch) | |
tree | 0a7e5f3276a339c6cd23b6ebf9a2fe9dcb8f33e5 /plugins | |
parent | 56cc69863c4ebea0d900127befb7d02175fa669e (diff) |
plugin/cheat: adjust path handling (nw)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/cheat/init.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index bf713495f39..459657ea122 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -66,13 +66,12 @@ function cheat.startplugin() local function load_cheats() local filename = emu.romname() local json = require("json") - local path = manager:machine():options().entries.cheatpath:value() - local file = emu.file(path .. ";" .. path .. "/cheat", 1) + local file = emu.file(manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat"), 1) if emu.softname() ~= "" then - for name, image in manager:machine().images do - if image:exists() and image:software_entry() then - filename = filename .. "/" .. image:software_entry() + for name, image in pairs(manager:machine().images) do + if image:exists() and image:software_list_name() ~= "" then + filename = image:software_list_name() .. "/" .. emu.softname() end end end |