Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -441,6 +441,11 @@ static const QString STATE_ADVANCED_MOVEMENT_CONTROLS = "AdvancedMovement"; · 440 unmodified lines | ||
| 441 | 441 | static const QString STATE_GROUNDED = "Grounded"; |
| 442 | 442 | static const QString STATE_NAV_FOCUSED = "NavigationFocused"; |
| 443 | 443 | |
| 444 | +// Statically provided display and input plugins | |
| 445 | +extern DisplayPluginList getDisplayPlugins(); | |
| 446 | +extern InputPluginList getInputPlugins(); | |
| 447 | +extern void saveInputPluginSettings(const InputPluginList& plugins); | |
| 448 | + | |
| 444 | 449 | bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { |
| 445 | 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 | 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 | 493 | if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) { |
| 484 | 494 | steamClient->init(); |
| 485 | 495 | } |