summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-04-05 09:38:59 +0000
committerJens Arnold <amiconn@rockbox.org>2008-04-05 09:38:59 +0000
commit1d8312f996e011ad1f0d94342fe30316c061c202 (patch)
tree00b8a12b073420ab3a2fc06e06e646b29eeb0a9b /apps/plugins
parent8f560bc2b5a612857f95f2c1352d69f3069030bf (diff)
Fix occasional crashes on greylib exit (LCD controller confusion) when running on COP.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16976 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lib/grey_core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c
index 143d09a6a6..b4e7dfd1f4 100644
--- a/apps/plugins/lib/grey_core.c
+++ b/apps/plugins/lib/grey_core.c
@@ -614,12 +614,15 @@ void grey_show(bool enable)
{
#ifdef SIMULATOR
_grey_info.rb->sim_lcd_ex_init(0, NULL);
-#else
+#else /* !SIMULATOR */
_grey_info.rb->timer_unregister();
+#if NUM_CORES > 1 /* Make sure the ISR has finished before calling lcd_update() */
+ _grey_info.rb->sleep(HZ/100);
+#endif
#ifdef NEED_BOOST
_grey_info.rb->cpu_boost(false);
#endif
-#endif
+#endif /* !SIMULATOR */
_grey_info.flags &= ~_GREY_RUNNING;
_grey_info.rb->screen_dump_set_hook(NULL);
_grey_info.rb->lcd_update(); /* restore whatever there was before */