diff options
| author | 2025-08-08 15:07:08 +0200 | |
|---|---|---|
| committer | 2025-08-08 15:07:08 +0200 | |
| commit | b7f50306067565be555a6acb87150a5c93d4bd17 (patch) | |
| tree | bd67a6bf878c66dee734b126084197d80f04a3cd /plugins | |
| parent | aaa4a4b91260c9eb41628189883bb8fe058c4981 (diff) | |
mameinfo/messinfo dat plugins: support driver sourcefile path
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/data/data_mameinfo.lua | 5 | ||||
| -rw-r--r-- | plugins/data/data_messinfo.lua | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/data/data_mameinfo.lua b/plugins/data/data_mameinfo.lua index 0e77e328cef..eb6aecb1144 100644 --- a/plugins/data/data_mameinfo.lua +++ b/plugins/data/data_mameinfo.lua @@ -16,8 +16,11 @@ function dat.check(set, softlist) if not status or not info then return nil end - local sourcefile = emu.driver_find(set).source_file:match('[^/\\]*$') + local sourcefile = emu.driver_find(set).source_file:match('[^/\\]+[/\\\\][^/\\]*$') status, drvinfo = pcall(datread, 'drv', 'info', sourcefile) + if not drvinfo then + status, drvinfo = pcall(datread, 'drv', 'info', sourcefile:match('[^/\\]*$')) + end if drvinfo then info = info .. _p('plugin-data', '\n\n--- DRIVER INFO ---\nDriver: ') .. sourcefile .. '\n\n' .. drvinfo end diff --git a/plugins/data/data_messinfo.lua b/plugins/data/data_messinfo.lua index 3c94322474f..b33a39638f7 100644 --- a/plugins/data/data_messinfo.lua +++ b/plugins/data/data_messinfo.lua @@ -16,8 +16,11 @@ function dat.check(set, softlist) if not status or not info then return nil end - local sourcefile = emu.driver_find(set).source_file:match('[^/\\]*$') + local sourcefile = emu.driver_find(set).source_file:match('[^/\\]+[/\\\\][^/\\]*$') status, drvinfo = pcall(datread, 'drv', 'info', sourcefile) + if not drvinfo then + status, drvinfo = pcall(datread, 'drv', 'info', sourcefile:match('[^/\\]*$')) + end if drvinfo then info = info .. _p('plugin-data', '\n\n--- DRIVER INFO ---\nDriver: ') .. sourcefile .. '\n\n' .. drvinfo end |
