summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index d6a0c25015c..1d020ee9cae 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -95,18 +95,15 @@ function cheat.startplugin()
local filename = emu.romname()
local newcheats = {}
local file = emu.file(manager.machine.options.entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat") , 1)
- if emu.softname() ~= "" then
- 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
+
+ for name, image in pairs(manager.machine.images) do
+ if image.exists and image.software_list_name ~= "" then
+ filename = image.software_list_name .. "/" .. image.filename
end
end
+
cheatname = filename
+ print(cheatname)
local function add(addcheats)
if not next(newcheats) then
newcheats = addcheats