mirror of
https://github.com/mamedev/mame.git
synced 2024-11-18 10:06:19 +01:00
923ef2c25d
* Use the plugin data folder for storing the cache. The history folder may be read-only or shared with different configurations. * Don't create the cache database or surrounding folder if there's nothing to store in it. * Actually use prepared queries multiple times rather than always destroying them after a single use. * Added proper error checking for most database operations. * Improved query performance by avoiding outer joins and table scans. -bus/nubus: Made the Macintosh Display Cards map the blue channel to white with monochrome monitors. Also added logging for PLL configuration to help debug how CRTC and RAMDAC clocks work in the future.
36 lines
635 B
Lua
36 lines
635 B
Lua
local dat = {}
|
|
|
|
local info, ver
|
|
local datread = require('data/load_dat')
|
|
do
|
|
local buttonchar
|
|
local function convert(str)
|
|
if not buttonchar then
|
|
buttonchar = require("data/button_char")
|
|
end
|
|
return buttonchar(str)
|
|
end
|
|
datread, ver = datread.open('command.dat', '#[^V]*Ver[^.:]*[.:]', convert)
|
|
end
|
|
|
|
function dat.check(set, softlist)
|
|
if softlist or not datread then
|
|
return nil
|
|
end
|
|
local status
|
|
status, info = pcall(datread, 'cmd', 'info', set)
|
|
if not status or not info then
|
|
return nil
|
|
end
|
|
return _p('plugin-data', 'Command')
|
|
end
|
|
|
|
function dat.get()
|
|
return info
|
|
end
|
|
|
|
function dat.ver()
|
|
return ver
|
|
end
|
|
|
|
return dat
|