Index: firmware/drivers/button.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/drivers/button.c,v
retrieving revision 1.119
diff -p -u -d -r1.119 button.c
--- firmware/drivers/button.c	20 Feb 2006 20:08:27 -0000	1.119
+++ firmware/drivers/button.c	24 Feb 2006 03:22:23 -0000
@@ -84,6 +84,7 @@ static bool remote_button_hold_only(void
 #if CONFIG_KEYPAD == IPOD_4G_PAD
 /* Variable to use for setting button status in interrupt handler */
 int int_btn = BUTTON_NONE;
+char int_wheel = 0;
 
 static void opto_i2c_init(void)
 {
@@ -153,6 +154,7 @@ static int ipod_4g_button_read(void)
             if (status & 0x1000)
                 btn |= BUTTON_MENU;
             if (status & 0x40000000) {
+                int_wheel = new_wheel_value;
                 /* scroll wheel down */
                 clickwheel_down = 1;
                 backlight_on();
@@ -1114,6 +1116,13 @@ int button_status(void)
     return lastbtn;
 }
 
+#if (CONFIG_KEYPAD == IPOD_4G_PAD)
+char wheel_status(void)
+{
+    return int_wheel;
+}
+#endif
+
 void button_clear_queue(void)
 {
     queue_clear(&button_queue);
Index: firmware/export/button.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/button.h,v
retrieving revision 1.40
diff -p -u -d -r1.40 button.h
--- firmware/export/button.h	22 Feb 2006 11:48:58 -0000	1.40
+++ firmware/export/button.h	24 Feb 2006 03:22:23 -0000
@@ -35,6 +35,7 @@ void button_init (void);
 long button_get (bool block);
 long button_get_w_tmo(int ticks);
 int button_status(void);
+char wheel_status(void);
 void button_clear_queue(void);
 #ifdef HAVE_LCD_BITMAP
 void button_set_flip(bool flip); /* turn 180 degrees */
Index: apps/plugin.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugin.c,v
retrieving revision 1.150
diff -p -u -d -r1.150 plugin.c
--- apps/plugin.c	18 Feb 2006 20:51:33 -0000	1.150
+++ apps/plugin.c	24 Feb 2006 05:12:54 -0000
@@ -181,8 +182,11 @@ static const struct plugin_api rockbox_a
     button_get,
     button_get_w_tmo,
     button_status,
+#if CONFIG_KEYPAD == IPOD_4G_PAD
+    wheel_status,
+#endif
     button_clear_queue,
-#if CONFIG_KEYPAD == IRIVER_H100_PAD
+#if CONFIG_KEYPAD == IRIVER_H100_PAD
     button_hold,
 #endif
 
Index: apps/plugin.h
===================================================================
RCS file: /cvsroot/rockbox/apps/plugin.h,v
retrieving revision 1.156
diff -p -u -d -r1.156 plugin.h
--- apps/plugin.h	18 Feb 2006 20:51:33 -0000	1.156
+++ apps/plugin.h	24 Feb 2006 05:13:31 -0000
@@ -233,8 +234,11 @@ struct plugin_api {
     long (*button_get)(bool block);
     long (*button_get_w_tmo)(int ticks);
     int (*button_status)(void);
+#if CONFIG_KEYPAD == IPOD_4G_PAD
+    char (*wheel_status)(void);
+#endif
     void (*button_clear_queue)(void);
-#if CONFIG_KEYPAD == IRIVER_H100_PAD
+#if CONFIG_KEYPAD == IRIVER_H100_PAD
     bool (*button_hold)(void);
 #endif
 

