summaryrefslogtreecommitdiffstats
path: root/src/libs/gui/ThreadedLoader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 17:13:34 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 17:13:34 +0000
commitec9540a559c40046123a2ac4be83faf90b79fbb0 (patch)
tree214f8463bc6c9ef12ac715f65db41427152a7710 /src/libs/gui/ThreadedLoader.cpp
parentbade64c9aca86225fa37950c17aabc02a3f4a041 (diff)
downloadingen-ec9540a559c40046123a2ac4be83faf90b79fbb0.tar.gz
ingen-ec9540a559c40046123a2ac4be83faf90b79fbb0.tar.bz2
ingen-ec9540a559c40046123a2ac4be83faf90b79fbb0.zip
Dynamically load Serialiser from serialisation module, make it actually work, etc.
git-svn-id: http://svn.drobilla.net/lad/ingen@850 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/ThreadedLoader.cpp')
-rw-r--r--src/libs/gui/ThreadedLoader.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index a1c28acf..11a2bcd7 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -29,17 +29,18 @@ namespace GUI {
ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
- : _serialisation_module(Ingen::Shared::load_module("ingen_serialisation"))
- , _engine(engine)
+ : _engine(engine)
, _deprecated_loader(engine)
- , _serializer(*App::instance().world()->rdf_world)
{
set_name("Loader");
// FIXME: rework this so the thread is only present when it's doing something (save mem)
- if (_serialisation_module) {
+ if (App::instance().serialisation_module()) {
Loader* (*new_loader)() = NULL;
- bool found = _serialisation_module->get_symbol("new_loader", (void*&)new_loader);
+
+ bool found = App::instance().serialisation_module()->get_symbol(
+ "new_loader", (void*&)new_loader);
+
if (found)
_loader = SharedPtr<Loader>(new_loader());
}
@@ -47,8 +48,8 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
if (_loader) {
start();
} else {
- cerr << "WARNING: Failed to load ingen_serialisation module, unable to load patches." << endl;;
- cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
+ cerr << "WARNING: Failed to load ingen_serialisation module, load disabled." << endl;
+ cerr << "(If you are running from the source tree, source set_dev_environment.sh)" << endl;
}
}
@@ -126,7 +127,7 @@ ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename)
void
ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& filename)
{
- _serializer.to_file(model, filename);
+ App::instance().serialiser()->to_file(model, filename);
}