Permalink
Browse files

performance: fix unmapped key handling

  • Loading branch information...
1 parent f040ca7 commit c0a7199a21dd8c06135259df0c355b4fa5d8ae1c @sbourdeauducq sbourdeauducq committed Nov 29, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/performance.c
@@ -427,13 +427,15 @@ static void event_callback(mtk_event *e, int count)
index = keycode_to_index(e[i].press.code);
if(index != -1) {
index = keyboard_patches[index];
- renderer_add_patch(patches[index].p);
+ if(index != -1)
+ renderer_add_patch(patches[index].p);
}
} else if(e[i].type == EVENT_TYPE_RELEASE) {
index = keycode_to_index(e[i].release.code);
if(index != -1) {
index = keyboard_patches[index];
- renderer_del_patch(patches[index].p);
+ if(index != -1)
+ renderer_del_patch(patches[index].p);
}
} else if(e[i].type == EVENT_TYPE_IR) {
index = e[i].press.code;

0 comments on commit c0a7199

Please sign in to comment.