summaryrefslogtreecommitdiffstats
path: root/uisimulator/x11/button-x11.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-21 23:55:39 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-21 23:55:39 +0000
commitb51f7dfc9b507ab9db12fe90b2ddad708f435e06 (patch)
treeefcef3411689401da21795d700a0741f8ab1072b /uisimulator/x11/button-x11.c
parente68680ac310adb8373c9f3a5194466766d64cf37 (diff)
downloadrockbox-b51f7dfc9b507ab9db12fe90b2ddad708f435e06.tar.gz
rockbox-b51f7dfc9b507ab9db12fe90b2ddad708f435e06.tar.bz2
rockbox-b51f7dfc9b507ab9db12fe90b2ddad708f435e06.zip
Backlight handling: * Added 'Caption Backlight' and 'Backlight On When Charging' for the iriver remote LCD. * Enabled the backlight code for the simulator, and prepared backlight simulation. It's only a stub atm, writing messages to the console window. * Added tick task handling to the simulators for this to work. * Code cleanup in backlight.c, less dead code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8034 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11/button-x11.c')
-rw-r--r--uisimulator/x11/button-x11.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/uisimulator/x11/button-x11.c b/uisimulator/x11/button-x11.c
index b2d8ab6c7a..e037867caf 100644
--- a/uisimulator/x11/button-x11.c
+++ b/uisimulator/x11/button-x11.c
@@ -21,6 +21,7 @@
#include "button.h"
#include "kernel.h"
#include "debug.h"
+#include "backlight.h"
#include "misc.h"
#include "X11/keysym.h"
@@ -47,7 +48,7 @@ static long lastbtn; /* Last valid button status */
/* mostly copied from real button.c */
void button_read (void);
-void button_tick(void)
+static void button_tick(void)
{
static int tick = 0;
static int count = 0;
@@ -117,6 +118,13 @@ void button_tick(void)
queue_post(&button_queue, BUTTON_REPEAT | btn, NULL);
else
queue_post(&button_queue, btn, NULL);
+#ifdef HAVE_REMOTE_LCD
+ if(btn & BUTTON_REMOTE)
+ remote_backlight_on();
+ else
+#endif
+ backlight_on();
+
}
}
else
@@ -276,6 +284,7 @@ long button_get_w_tmo(int ticks)
void button_init(void)
{
+ tick_add_task(button_tick);
}
int button_status(void)