From e9ea28e1efb241619606b937ecd2e97f7e23d897 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Aug 2008 22:45:35 +0000 Subject: Begin factoring out common elements of EngineInterface and ClientInterface. git-svn-id: http://svn.drobilla.net/lad/ingen@1406 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/NewSubpatchWindow.cpp | 2 +- src/libs/gui/ThreadedLoader.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/libs/gui') diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp index e33c9f2e..90e6c911 100644 --- a/src/libs/gui/NewSubpatchWindow.cpp +++ b/src/libs/gui/NewSubpatchWindow.cpp @@ -92,7 +92,7 @@ NewSubpatchWindow::ok_clicked() const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text()); const uint32_t poly = _poly_spinbutton->get_value_as_int(); - App::instance().engine()->create_patch(path, poly); + App::instance().engine()->new_patch(path, poly); for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i) App::instance().engine()->set_variable(path, i->first, i->second); diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp index 94c517a8..c2ba9307 100644 --- a/src/libs/gui/ThreadedLoader.cpp +++ b/src/libs/gui/ThreadedLoader.cpp @@ -19,6 +19,7 @@ #include #include "module/global.hpp" #include "module/World.hpp" +#include "module/Module.hpp" #include "client/PatchModel.hpp" #include "App.hpp" #include "ThreadedLoader.hpp" @@ -34,9 +35,15 @@ ThreadedLoader::ThreadedLoader(SharedPtr engine) , _deprecated_loader(engine) { set_name("Loader"); - + // FIXME: rework this so the thread is only present when it's doing something (save mem) - if (App::instance().world()->serialisation_module) { + // and module isn't loaded until required + + World* world = App::instance().world(); + if (!world->serialisation_module) + world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); + + if (world->serialisation_module) { Loader* (*new_loader)() = NULL; bool found = App::instance().world()->serialisation_module->get_symbol( -- cgit v1.2.1