summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/plugin-support.hpp10
-rw-r--r--opentrack/shortcuts.cpp2
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