diff options
author | 2016-11-02 15:33:11 -0500 | |
---|---|---|
committer | 2016-11-02 15:33:11 -0500 | |
commit | 330b0d146dd49946b9d34d83eaf62984c4f9ec71 (patch) | |
tree | ab31c4d8b85591ba54f4305b37d899c5becfe213 /plugins/data | |
parent | bfc49b0974e4d040122dc8e546992d0ebdc418aa (diff) |
plugins/data: fix driver info (nw)
Diffstat (limited to 'plugins/data')
-rw-r--r-- | plugins/data/data_mameinfo.lua | 7 | ||||
-rw-r--r-- | plugins/data/data_messinfo.lua | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/plugins/data/data_mameinfo.lua b/plugins/data/data_mameinfo.lua index 641c0bc954e..5f42fe6a36f 100644 --- a/plugins/data/data_mameinfo.lua +++ b/plugins/data/data_mameinfo.lua @@ -7,11 +7,16 @@ function dat.check(set, softlist) if softlist or not datread then return nil end - local status + local status, drvinfo status, info = pcall(datread, "mame", "info", set) if not status or not info then return nil end + local sourcefile = emu.driver_find(set).source_file:match("[^/\\]*$") + status, drvinfo = pcall(datread, "drv", "info", sourcefile) + if drvinfo then + info = info .. "\n\n--- DRIVER INFO ---\nDriver: " .. sourcefile .. "\n\n" .. drvinfo + end info = info:gsub("\n\n", "\n") return "Mameinfo" end diff --git a/plugins/data/data_messinfo.lua b/plugins/data/data_messinfo.lua index 5554682598f..86949e30431 100644 --- a/plugins/data/data_messinfo.lua +++ b/plugins/data/data_messinfo.lua @@ -8,11 +8,16 @@ function dat.check(set, softlist) if softlist or not datread then return nil end - local status + local status, drvinfo status, info = pcall(datread, "mame", "info", set) if not status or not info then return nil end + local sourcefile = emu.driver_find(set).source_file:match("[^/\\]*$") + status, drvinfo = pcall(datread, "drv", "info", sourcefile) + if drvinfo then + info = info .. "\n\n--- DRIVER INFO ---\nDriver: " .. sourcefile .. "\n\n" .. drvinfo + end info = info:gsub("\n\n", "\n") return "Messinfo" end |