summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-11-17 14:21:05 +0100
committerSolomon Peachy <pizza@shaftnet.org>2021-11-22 08:06:44 -0500
commit5bd9ed801f4ef684e148222710e042c113e48e58 (patch)
treefa551cef9cfd3f8248ed46a302fc552368659442 /apps
parentf9ce8720c4fa7e5fa53e3aed03653f359fec4125 (diff)
downloadrockbox-5bd9ed801f4ef684e148222710e042c113e48e58.tar.gz
rockbox-5bd9ed801f4ef684e148222710e042c113e48e58.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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c21
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)
3851 break; 3851 break;
3852#if PF_PLAYBACK_CAPABLE 3852#if PF_PLAYBACK_CAPABLE
3853 case PF_CONTEXT: 3853 case PF_CONTEXT:
3854 if ( pf_cfg.auto_wps != 0 ) { 3854 if ( pf_cfg.auto_wps != 0 &&
3855 (pf_state == pf_idle || pf_state == pf_show_tracks)) {
3855 if( pf_state == pf_idle ) { 3856 if( pf_state == pf_idle ) {
3856 create_track_index(center_slide.slide_index); 3857 create_track_index(center_slide.slide_index);
3857 reset_track_list(); 3858 reset_track_list();
3858 start_playback(true); 3859 start_playback(true);
3859 free_borrowed_tracks(); 3860 free_borrowed_tracks();
3860 rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST));
3861 } 3861 }
3862 else if( pf_state == pf_show_tracks ) { 3862 else
3863 {
3863 rb->playlist_insert_track(NULL, get_track_filename(pf_tracks.sel), 3864 rb->playlist_insert_track(NULL, get_track_filename(pf_tracks.sel),
3864 PLAYLIST_INSERT_LAST, false, true); 3865 PLAYLIST_INSERT_LAST, false, true);
3865 rb->playlist_sync(NULL); 3866 rb->playlist_sync(NULL);
3866 rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST));
3867 } 3867 }
3868#ifdef USEGSLIB
3869 /*
3870 calling splash() without switching off the grayscale overlay
3871 beforehand, will lead to image corruption and a crash
3872 in testing on device (iPod 4G,iPod mini)
3873 */
3874 grey_show(false);
3875 rb->lcd_clear_display();
3876#endif
3877 rb->splash(HZ*2, ID2P(LANG_ADDED_TO_PLAYLIST));
3878#ifdef USEGSLIB
3879 grey_show(true);
3880#endif
3868 } 3881 }
3869 break; 3882 break;
3870#endif 3883#endif