mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
9e36b6a6d9
Made the sound manager mute controls readable, and got rid of system enable since it just controls system mute anyway. This was causing confusion: phantom2 was trying to use both independentlyt casuing the mute bit to be ignored. THe Lua interface changes are mostly changing methods to properties, some renames to make things clearer, and some additional properties for better control over snapshots.
26 lines
876 B
Lua
26 lines
876 B
Lua
-- license:BSD-3-Clause
|
|
-- copyright-holders:Miodrag Milanovic
|
|
require('lfs')
|
|
|
|
_G._ = emu.lang_translate
|
|
_G.emu.plugin = {} -- table to contain plugin interfaces
|
|
-- substitute environment variables in the plugins path from options
|
|
local dirs = emu.subst_env(manager.options.entries.pluginspath:value())
|
|
|
|
-- and split the paths apart and make them suitable for package.path
|
|
package.path = ""
|
|
for dir in string.gmatch(dirs, "([^;]+)") do
|
|
if (package.path ~= "") then
|
|
package.path = package.path .. ";"
|
|
end
|
|
package.path = package.path .. dir .. "/?.lua;" .. dir .. "/?/init.lua"
|
|
end
|
|
|
|
for _,entry in pairs(manager.plugins) do
|
|
if (entry.type == "plugin" and entry.start) then
|
|
emu.print_verbose("Starting plugin " .. entry.name .. "...")
|
|
plugin = require(entry.name)
|
|
if plugin.set_folder~=nil then plugin.set_folder(entry.directory) end
|
|
plugin.startplugin();
|
|
end
|
|
end
|