mirror of https://github.com/odrling/Aegisub
2000 GET!! Changed how the Lua factory is registered.
Originally committed to SVN as r2000.
This commit is contained in:
parent
f8d7c69c15
commit
777242fce3
|
@ -255,15 +255,17 @@ namespace Automation4 {
|
||||||
// Factory class for Lua scripts
|
// Factory class for Lua scripts
|
||||||
class LuaScriptFactory : public ScriptFactory {
|
class LuaScriptFactory : public ScriptFactory {
|
||||||
public:
|
public:
|
||||||
LuaScriptFactory()
|
LuaScriptFactory() { }
|
||||||
|
|
||||||
|
~LuaScriptFactory() { }
|
||||||
|
|
||||||
|
void RegisterFactory ()
|
||||||
{
|
{
|
||||||
engine_name = _T("Lua");
|
engine_name = _T("Lua");
|
||||||
filename_pattern = _T("*.lua");
|
filename_pattern = _T("*.lua");
|
||||||
Register(this);
|
Register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~LuaScriptFactory() { }
|
|
||||||
|
|
||||||
virtual Script* Produce(const wxString &filename) const
|
virtual Script* Produce(const wxString &filename) const
|
||||||
{
|
{
|
||||||
// Just check if file extension is .lua
|
// Just check if file extension is .lua
|
||||||
|
|
|
@ -82,7 +82,8 @@ void PluginManager::RegisterBuiltInPlugins() {
|
||||||
|
|
||||||
// Automation languages
|
// Automation languages
|
||||||
#ifdef WITH_AUTO4_LUA
|
#ifdef WITH_AUTO4_LUA
|
||||||
new Automation4::LuaScriptFactory();
|
Automation4::LuaScriptFactory *lua = new Automation4::LuaScriptFactory();
|
||||||
|
lua->RegisterFactory();
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_PERL
|
#ifdef WITH_PERL
|
||||||
Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory();
|
Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory();
|
||||||
|
|
Loading…
Reference in New Issue