mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 12:19:13 -05:00
fix: list MAME's hash, plugins and floppy sounds
The libretro core passes system/mame/{hash,plugins,samples} (retro_init.cpp:111-155). Software lists are required in mamemess, where softlists are on by default. The trees and the 19 floppy samples are collected from libretro/mame at the pin.
This commit is contained in:
1 parent
57d5c3ffd0
commit
74514930d0
877 files changed
+2734365
No files matched your search
@@ -0,0 +1,38 @@
|
||||
local dat = {}
|
||||
|
||||
local ver, info
|
||||
local datread = require('data/load_dat')
|
||||
datread, ver = datread.open(
|
||||
'messinfo.dat',
|
||||
'# MESSINFO.DAT',
|
||||
function (str) return str:gsub('\n\n', '\n') end)
|
||||
|
||||
function dat.check(set, softlist)
|
||||
if softlist or not datread then
|
||||
return nil
|
||||
end
|
||||
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 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
|
||||
return _p('plugin-data', 'MESSinfo')
|
||||
end
|
||||
|
||||
function dat.get()
|
||||
return info
|
||||
end
|
||||
|
||||
function dat.ver()
|
||||
return ver
|
||||
end
|
||||
|
||||
return dat
|
||||
Reference in new issue
Block a user