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
This commit is contained in:
Jens Arnold 2008-04-05 09:38:59 +00:00
parent 8f560bc2b5
commit 1d8312f996

View file

@ -614,12 +614,15 @@ void grey_show(bool enable)
{ {
#ifdef SIMULATOR #ifdef SIMULATOR
_grey_info.rb->sim_lcd_ex_init(0, NULL); _grey_info.rb->sim_lcd_ex_init(0, NULL);
#else #else /* !SIMULATOR */
_grey_info.rb->timer_unregister(); _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 #ifdef NEED_BOOST
_grey_info.rb->cpu_boost(false); _grey_info.rb->cpu_boost(false);
#endif #endif
#endif #endif /* !SIMULATOR */
_grey_info.flags &= ~_GREY_RUNNING; _grey_info.flags &= ~_GREY_RUNNING;
_grey_info.rb->screen_dump_set_hook(NULL); _grey_info.rb->screen_dump_set_hook(NULL);
_grey_info.rb->lcd_update(); /* restore whatever there was before */ _grey_info.rb->lcd_update(); /* restore whatever there was before */