mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
849e8abe8d
commit
44e97b9ef6
1 changed files with 10 additions and 2 deletions
|
@ -633,7 +633,11 @@ static int scroll_bmp(struct image_info *info, bool initial_frame)
|
|||
case IMGVIEW_LEFT:
|
||||
if (entries > 1 && info->width <= LCD_WIDTH
|
||||
&& info->height <= LCD_HEIGHT)
|
||||
return change_filename(DIR_PREV);
|
||||
{
|
||||
int result = change_filename(DIR_PREV);
|
||||
if (entries > 1)
|
||||
return result;
|
||||
}
|
||||
/* fallthrough */
|
||||
case IMGVIEW_LEFT | BUTTON_REPEAT:
|
||||
pan_view_left(info);
|
||||
|
@ -642,7 +646,11 @@ static int scroll_bmp(struct image_info *info, bool initial_frame)
|
|||
case IMGVIEW_RIGHT:
|
||||
if (entries > 1 && info->width <= LCD_WIDTH
|
||||
&& info->height <= LCD_HEIGHT)
|
||||
return change_filename(DIR_NEXT);
|
||||
{
|
||||
int result = change_filename(DIR_NEXT);
|
||||
if (entries > 1)
|
||||
return result;
|
||||
}
|
||||
/* fallthrough */
|
||||
case IMGVIEW_RIGHT | BUTTON_REPEAT:
|
||||
pan_view_right(info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue