Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

plugins: imageviewer: Don't reload the image on the prev/next action if it's a single image.

Fixes image reloading when only a single image file is present among other files.

Change-Id: I6400af556d866ac96a3532712563bf01cbd29f68

+10 -2
+10 -2
apps/plugins/imageviewer/imageviewer.c
··· 633 633 case IMGVIEW_LEFT: 634 634 if (entries > 1 && info->width <= LCD_WIDTH 635 635 && info->height <= LCD_HEIGHT) 636 - return change_filename(DIR_PREV); 636 + { 637 + int result = change_filename(DIR_PREV); 638 + if (entries > 1) 639 + return result; 640 + } 637 641 /* fallthrough */ 638 642 case IMGVIEW_LEFT | BUTTON_REPEAT: 639 643 pan_view_left(info); ··· 642 646 case IMGVIEW_RIGHT: 643 647 if (entries > 1 && info->width <= LCD_WIDTH 644 648 && info->height <= LCD_HEIGHT) 645 - return change_filename(DIR_NEXT); 649 + { 650 + int result = change_filename(DIR_NEXT); 651 + if (entries > 1) 652 + return result; 653 + } 646 654 /* fallthrough */ 647 655 case IMGVIEW_RIGHT | BUTTON_REPEAT: 648 656 pan_view_right(info);