diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-11-17 14:21:05 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-11-22 08:06:44 -0500 |
commit | 5bd9ed801f4ef684e148222710e042c113e48e58 (patch) | |
tree | fa551cef9cfd3f8248ed46a302fc552368659442 | |
parent | f9ce8720c4fa7e5fa53e3aed03653f359fec4125 (diff) | |
download | rockbox-5bd9ed801f.tar.gz rockbox-5bd9ed801f.zip |
Fix: PictureFlow splash() crash on grayscale targets
On targets where the grayscale framework is used, splash()
won't work (and may crash) if the overlay is not
switched off first. This is not reproducible in the simulator.
Change-Id: Ia22087c4978c8fa247d6d4c64c4b600e4393eebf
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index d0c2c3ef6c..98ccba56f3 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -3851,20 +3851,33 @@ static int pictureflow_main(void) break; #if PF_PLAYBACK_CAPABLE case PF_CONTEXT: - if ( pf_cfg.auto_wps != 0 ) { + if ( pf_cfg.auto_wps != 0 && + (pf_state == pf_idle || pf_state == pf_show_tracks)) { if( pf_state == pf_idle ) { create_track_index(center_slide.slide_index); reset_track_list(); start_playback(true); free_borrowed_tracks(); - rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST)); } - else if( pf_state == pf_show_tracks ) { + else + { rb->playlist_insert_track(NULL, get_track_filename(pf_tracks.sel), PLAYLIST_INSERT_LAST, false, true); rb->playlist_sync(NULL); - rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST)); } +#ifdef USEGSLIB + /* + calling splash() without switching off the grayscale overlay + beforehand, will lead to image corruption and a crash + in testing on device (iPod 4G,iPod mini) + */ + grey_show(false); + rb->lcd_clear_display(); +#endif + rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST)); +#ifdef USEGSLIB + grey_show(true); +#endif } break; #endif |