summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-05-02 09:37:34 -0500
committer cracyc <cracyc@users.noreply.github.com>2018-05-02 09:37:34 -0500
commitfec83c922befa3f051af10c078b1fb58faf30777 (patch)
treebfba2a01137647767ab1c136d120ace024fa24e6 /plugins/cheat/init.lua
parentf5191c86057fe4c1486a0f7733af0e01ef4b00b5 (diff)
plugins: handle the case where the ui prepends the list name to the list entry name (nw)
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index c6f70a56acc..9495cfc689b 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -92,9 +92,13 @@ function cheat.startplugin()
local newcheats = {}
local file = emu.file(manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat") , 1)
if emu.softname() ~= "" then
- 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()
+ if emu.softname():find(":") then
+ filename = emu.softname():gsub(":", "/")
+ else
+ 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
end