Exemple #1
0
// TODO migrate to a DLL model where plugins are discovered and loaded at runtime by the PluginManager class
InputPluginList getInputPlugins() {
    InputPlugin* PLUGIN_POOL[] = {
        new KeyboardMouseDevice(),
        new TouchscreenDevice(),
        nullptr
    };

    InputPluginList result;
    for (int i = 0; PLUGIN_POOL[i]; ++i) {
        InputPlugin* plugin = PLUGIN_POOL[i];
        if (plugin->isSupported()) {
            result.push_back(InputPluginPointer(plugin));
        }
    }
    return result;
}
Exemple #2
0
// TODO migrate to a DLL model where plugins are discovered and loaded at runtime by the PluginManager class
InputPluginList getInputPlugins() {
    InputPlugin* PLUGIN_POOL[] = {
        new KeyboardMouseDevice(),
        new SDL2Manager(),
        new SixenseManager(),
        new ViveControllerManager(),
        nullptr
    };

    InputPluginList result;
    for (int i = 0; PLUGIN_POOL[i]; ++i) {
        InputPlugin* plugin = PLUGIN_POOL[i];
        if (plugin->isSupported()) {
            plugin->init();
            result.push_back(InputPluginPointer(plugin));
        }
    }
    return result;
}