File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,7 @@ static void event_callback(mtk_event *e, int count)
363
363
364
364
index = -1 ;
365
365
if (simple_mode ) {
366
+ t = rtems_clock_get_ticks_since_boot ();
366
367
next = 0 ;
367
368
for (i = 0 ;i < count ;i ++ ) {
368
369
if (e [i ].type == EVENT_TYPE_PRESS ) {
@@ -373,11 +374,8 @@ static void event_callback(mtk_event *e, int count)
373
374
}
374
375
}
375
376
if (as_mode ) {
376
- t = rtems_clock_get_ticks_since_boot ();
377
- if (t >= next_as_time ) {
377
+ if (t >= next_as_time )
378
378
next = 1 ;
379
- next_as_time = t + AUTOSWITCH_PERIOD ;
380
- }
381
379
}
382
380
if (next ) {
383
381
current_patch += next ;
@@ -386,6 +384,7 @@ static void event_callback(mtk_event *e, int count)
386
384
if (current_patch < 0 )
387
385
current_patch = npatches - 1 ;
388
386
index = current_patch ;
387
+ next_as_time = t + AUTOSWITCH_PERIOD ;
389
388
}
390
389
if (dt_mode && (index != -1 ))
391
390
osd_event (patches [index ].filename );
You can’t perform that action at this time.
0 commit comments