freemyipod r199 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r198‎ | r199 | r200 >
Date:14:04, 6 September 2010
Author:theseven
Status:new
Tags:
Comment:
Prevent iLoader from recognizing spurious button presses after an FTL check was performed
Modified paths:
  • /apps/iloader/main.c (modified) (history)

Diff [purge]

Index: apps/iloader/main.c
@@ -23,6 +23,7 @@
2424 if (eventtype == BUTTON_PRESS) button |= 1 << which;
2525 if (eventtype == WHEEL_FORWARD) increment += value;
2626 else if (eventtype == WHEEL_BACKWARD) increment -= value;
 27+ cprintf(2, "iLoader got button event, presses: %02X", button);
2728 mutex_unlock(&eventmtx);
2829 wakeup_signal(&eventwakeup);
2930 }
@@ -136,6 +137,8 @@
137138 int width = lcd_get_width();
138139 int height = lcd_get_height();
139140
 141+ button = 0;
 142+ increment = 0;
140143 mutex_init(&eventmtx);
141144 wakeup_init(&eventwakeup);
142145 button_register_handler(handler);