summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mosaique.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-12-18 14:17:28 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-12-18 14:17:28 +0000
commitdc010201a5020b8b468a1a24a8fafb45a8986530 (patch)
treed07b364d2ee16ed4d0c4c9ad9818096c7e57f536 /apps/plugins/mosaique.c
parent3e2aba0c3eded353ba119e5df23968d70b1263c5 (diff)
downloadrockbox-dc010201a5020b8b468a1a24a8fafb45a8986530.tar.gz
rockbox-dc010201a5020b8b468a1a24a8fafb45a8986530.tar.bz2
rockbox-dc010201a5020b8b468a1a24a8fafb45a8986530.zip
make sure plugin reset backlight setting before exit. do code polish.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24076 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mosaique.c')
-rw-r--r--apps/plugins/mosaique.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 51005fdabd..0f3e9ffc08 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -208,20 +208,20 @@ enum plugin_status plugin_start(const void* parameter)
x = 2*GFX_WIDTH-x;
sx=-sx;
}
-
+
if (x<0)
{
x = -x;
sx = -sx;
}
-
+
y+=sy;
if (y>GFX_HEIGHT)
{
y = 2*GFX_HEIGHT-y;
sy=-sy;
}
-
+
if (y<0)
{
y = -y;
@@ -235,7 +235,7 @@ enum plugin_status plugin_start(const void* parameter)
MYLCD(update)();
rb->sleep(HZ/timer);
-
+
button = rb->button_get(false);
switch (button)
{
@@ -254,7 +254,7 @@ enum plugin_status plugin_start(const void* parameter)
if (timer>20)
timer=5;
break;
-
+
case MOSAIQUE_RESTART:
sx = rb->rand() % (GFX_HEIGHT/2) + 1;
@@ -278,5 +278,3 @@ enum plugin_status plugin_start(const void* parameter)
}
}
}
-
-