2016-09-05 21:43:17 -05:00
|
|
|
local dat = {}
|
|
|
|
|
|
2022-06-25 04:57:24 +10:00
|
|
|
local ver, info
|
|
|
|
|
local datread = require('data/load_dat')
|
|
|
|
|
datread, ver = datread.open('gameinit.dat', '# .-GAMEINIT.DAT')
|
2016-09-05 21:43:17 -05:00
|
|
|
|
|
|
|
|
function dat.check(set, softlist)
|
|
|
|
|
if softlist or not datread then
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
local status
|
2022-06-25 04:57:24 +10:00
|
|
|
status, info = pcall(datread, 'mame', 'info', set)
|
2016-09-05 21:43:17 -05:00
|
|
|
if not status or not info then
|
|
|
|
|
return nil
|
|
|
|
|
end
|
2022-06-25 04:57:24 +10:00
|
|
|
return _p('plugin-data', 'Gameinit')
|
2016-09-05 21:43:17 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function dat.get()
|
|
|
|
|
return info
|
|
|
|
|
end
|
|
|
|
|
|
2016-09-06 22:11:01 -05:00
|
|
|
function dat.ver()
|
|
|
|
|
return ver
|
|
|
|
|
end
|
|
|
|
|
|
2016-09-05 21:43:17 -05:00
|
|
|
return dat
|