diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-07 13:10:30 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-07 13:10:30 +0200 |
commit | d81cf6d2b47af80b5fef0d18ef5bcb5eea695a55 (patch) | |
tree | d20eb4c4d531a8a5af8a46f058dd54563f1a8b56 /opentrack | |
parent | 2b95bdafd9d48f7214d12104a08c0248b9ec0d15 (diff) | |
parent | 7abfd9593409bb0c16f4ee6d19fea14d7e85c57d (diff) |
Merge branch 'work' into trackhat-ui
* work:
qfc: double the discrete value count
shortcuts: sleep less, drop less keystrokes
accela: revert rot gains to rc15
ft: try without locking this time
ft: cleanup comments
csv: cleanup
main, ui: fix sort order
ui: fix close on save
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/plugin-support.hpp | 10 | ||||
-rw-r--r-- | opentrack/shortcuts.cpp | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp index cd7eb528..3a0a3420 100644 --- a/opentrack/plugin-support.hpp +++ b/opentrack/plugin-support.hpp @@ -20,6 +20,7 @@ #include <cstdio> #include <cinttypes> #include <iostream> +#include <algorithm> #include <QCoreApplication> #include <QFile> @@ -240,6 +241,12 @@ private: QList<mem<dylib>> filter_modules; QList<mem<dylib>> tracker_modules; QList<mem<dylib>> protocol_modules; + + template<typename t> + static void sort(QList<t>& xs) + { + std::sort(xs.begin(), xs.end(), [&](const t& a, const t& b) { return a->name.toLower() < b->name.toLower(); }); + } QList<mem<dylib>> filter(dylib::Type t) { @@ -247,6 +254,9 @@ private: for (auto x : module_list) if (x->type == t) ret.push_back(x); + + sort(ret); + return ret; } }; diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index e20fa1c0..a3c0773b 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -107,7 +107,7 @@ void KeybindingWorker::run() { } // keypresses get dropped with high values - Sleep(15); + Sleep(8); } } #endif |