コード例 #1
0
ファイル: gd_browser.cpp プロジェクト: rzr/giada
void gdBrowser::__cb_loadPlugin() {

	if (browser->text(browser->value()) == NULL)
		return;

	int res = G_PluginHost.addPlugin(browser->get_selected_item(), stackType, ch);

	/* store the folder path inside G_Conf, in order to reuse it the
	 * next time. */

	G_Conf.setPath(G_Conf.pluginPath, where->value());

	if (res)
		do_callback();
	else
		gdAlert("Unable to load the selected plugin!");
}
コード例 #2
0
static int __mh_readPatchPlugins__(vector<Patch::plugin_t> *list, int type)
{
	int ret = 1;
	for (unsigned i=0; i<list->size(); i++) {
		Patch::plugin_t *ppl = &list->at(i);
		Plugin *plugin = G_PluginHost.addPlugin(ppl->path.c_str(), type, NULL);
		if (plugin != NULL) {
			plugin->setBypass(ppl->bypass);
			for (unsigned j=0; j<ppl->params.size(); j++)
				plugin->setParameter(j, ppl->params.at(j));
			ret &= 1;
		}
		else
			ret &= 0;
	}
	return ret;
}