mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
plugins/cheat: oops (nw)
This commit is contained in:
parent
78614368bf
commit
247f723094
@ -113,7 +113,11 @@ function cheat.startplugin()
|
||||
|
||||
local function load_hotkeys()
|
||||
local json = require("json")
|
||||
local hotkeys = json.parse(io.open(manager:machine():options().entries.cheatpath:value():match("([^;]+)") .. "/" .. cheatname .. "_hotkeys.json", "r"):read("a"))
|
||||
local file = io.open(manager:machine():options().entries.cheatpath:value():match("([^;]+)") .. "/" .. cheatname .. "_hotkeys.json", "r")
|
||||
if not file then
|
||||
return
|
||||
end
|
||||
local hotkeys = json.parse(file:read("a"))
|
||||
for num, val in ipairs(hotkeys) do
|
||||
for num, cheat in pairs(cheats) do
|
||||
if val.desc == cheat.desc then
|
||||
|
Loading…
Reference in New Issue
Block a user