plugins/data: fix driver info (nw)

This commit is contained in:
cracyc 2016-11-02 15:33:11 -05:00
parent bfc49b0974
commit 330b0d146d
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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