summaryrefslogtreecommitdiffhomepage
path: root/opentrack/keybinding-worker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-12-17 22:52:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-12-17 22:52:54 +0100
commit3e543b11f57aa6c010045fb9614eb2638ac6ae81 (patch)
tree2975fccb82dc638d303ae6a6208c3e20ac448a0b /opentrack/keybinding-worker.cpp
parentf38541f1956133be9b093d5439128d3481b7e5fa (diff)
api/joy: refresh only manually on certain events
Refresh joylist when new listener arrives, and when the joy singleton just gets created. Enumerating joys all the time causes high CPU usage for some of the users. Issue: #279 Backtrace-by: @exulant Reported-by: @aka2k
Diffstat (limited to 'opentrack/keybinding-worker.cpp')
-rw-r--r--opentrack/keybinding-worker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/opentrack/keybinding-worker.cpp b/opentrack/keybinding-worker.cpp
index b0cef22d..39693a7c 100644
--- a/opentrack/keybinding-worker.cpp
+++ b/opentrack/keybinding-worker.cpp
@@ -164,6 +164,7 @@ KeybindingWorker::fun* KeybindingWorker::_add_receiver(fun& receiver)
receivers.push_back(std::unique_ptr<fun>(new fun(receiver)));
fun* f = receivers[receivers.size() - 1].get();
qDebug() << "add receiver" << (long) f;
+ joy_ctx.refresh();
return f;
}