summaryrefslogtreecommitdiff
path: root/apps/plugins/lamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lamp.c')
-rw-r--r--apps/plugins/lamp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c
index e355ee4ce3..ace6545865 100644
--- a/apps/plugins/lamp.c
+++ b/apps/plugins/lamp.c
@@ -110,6 +110,7 @@ static int colorset[NUM_COLORSETS][3] = { { 255, 255, 255 } , /* white */
110/* this is the plugin entry point */ 110/* this is the plugin entry point */
111enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 111enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
112{ 112{
113 long button;
113 (void)parameter; 114 (void)parameter;
114 rb = api; 115 rb = api;
115 116
@@ -167,7 +168,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
167 rb->lcd_clear_display(); 168 rb->lcd_clear_display();
168 rb->lcd_update(); 169 rb->lcd_update();
169 170
170 switch(rb->button_get(true)) 171 switch((button = rb->button_get(true)))
171 { 172 {
172 case LAMP_RIGHT: 173 case LAMP_RIGHT:
173#ifdef LAMP_NEXT 174#ifdef LAMP_NEXT
@@ -196,9 +197,10 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
196 case (LAMP_PREV|BUTTON_REL): 197 case (LAMP_PREV|BUTTON_REL):
197#endif /* LAMP_PREV */ 198#endif /* LAMP_PREV */
198 /* eat these... */ 199 /* eat these... */
199 break; 200 break;
200 default: 201 default:
201 quit = true; 202 if (!IS_SYSEVENT(button))
203 quit = true;
202 } 204 }
203 } while (!quit); 205 } while (!quit);
204 206