History

Remove dependency between codec plugins and UI

Brad Davis committed 9 years ago

Commit fe7d4b11 parent 63279f411 files · +58 −29Browse files

Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all

Unified · Split

interface/src/Application.cpp+10−0
@@ -441,6 +441,11 @@ static const QString STATE_ADVANCED_MOVEMENT_CONTROLS = "AdvancedMovement"; · 440 unmodified lines
441static const QString STATE_GROUNDED = "Grounded";441static const QString STATE_GROUNDED = "Grounded";
442static const QString STATE_NAV_FOCUSED = "NavigationFocused";442static const QString STATE_NAV_FOCUSED = "NavigationFocused";
443 443
444// Statically provided display and input plugins
445extern DisplayPluginList getDisplayPlugins();
446extern InputPluginList getInputPlugins();
447extern void saveInputPluginSettings(const InputPluginList& plugins);
448
444bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {449bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
445 const char** constArgv = const_cast<const char**>(argv);450 const char** constArgv = const_cast<const char**>(argv);
446 451
@@ -480,6 +485,11 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 33 unmodified lines
480 485
481 Setting::init();486 Setting::init();
482 487
488 // Tell the plugin manager about our statically linked plugins
489 PluginManager::setInputPluginProvider([] { return getInputPlugins(); });
490 PluginManager::setDisplayPluginProvider([] { return getDisplayPlugins(); });
491 PluginManager::setInputPluginSettingsPersister([](const InputPluginList& plugins) { saveInputPluginSettings(plugins); });
492
483 if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {493 if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
484 steamClient->init();494 steamClient->init();
485 }495 }