Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add [previous] to simple mode, short press F11/LeftButton

  • Loading branch information...
commit d90b8c1194569a3de46b5c2cf3ca33aebdc125bf 1 parent d6ca1d3
Xiangfu Liu authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/performance.c
View
12 src/performance.c
@@ -365,8 +365,12 @@ static void event_callback(mtk_event *e, int count)
if(simple_mode) {
next = 0;
for(i=0;i<count;i++) {
- if((e[i].type == EVENT_TYPE_PRESS) && (e[i].press.code == MTK_KEY_F11))
- next = 1;
+ if(e[i].type == EVENT_TYPE_PRESS) {
+ if (e[i].press.code == MTK_KEY_F11)
+ next = 1;
+ if (e[i].press.code == MTK_KEY_F9)
+ next = -1;
+ }
}
if(as_mode) {
t = rtems_clock_get_ticks_since_boot();
@@ -376,9 +380,11 @@ static void event_callback(mtk_event *e, int count)
}
}
if(next) {
- current_patch++;
+ current_patch += next;
if(current_patch == npatches)
current_patch = 0;
+ if(current_patch < 0)
+ current_patch = npatches - 1;
index = current_patch;
}
if(dt_mode && (index != -1))
Please sign in to comment.
Something went wrong with that request. Please try again.