diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/jpeg.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index be9e4db5e2..99cdf5ba61 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -1470,22 +1470,18 @@ int root_size; | |||
1470 | /* interactively scroll around the image */ | 1470 | /* interactively scroll around the image */ |
1471 | int scroll_bmp(struct t_disp* pdisp) | 1471 | int scroll_bmp(struct t_disp* pdisp) |
1472 | { | 1472 | { |
1473 | /*empty the button queue first, to avoid unwanted scrolling */ | ||
1474 | while(rb->button_get(false) != BUTTON_NONE); | ||
1475 | |||
1473 | while (true) | 1476 | while (true) |
1474 | { | 1477 | { |
1475 | int button; | 1478 | int button; |
1476 | int move; | 1479 | int move; |
1477 | 1480 | ||
1478 | /* we're unfortunately slower than key repeat, | ||
1479 | so empty the button queue, to avoid post-scroll */ | ||
1480 | while(rb->button_get(false) != BUTTON_NONE); | ||
1481 | |||
1482 | button = rb->button_get(true); | 1481 | button = rb->button_get(true); |
1483 | 1482 | ||
1484 | if (button == SYS_USB_CONNECTED) | 1483 | if (button == SYS_USB_CONNECTED) |
1485 | { | ||
1486 | gray_release_buffer(); /* switch off overlay and deinitialize */ | ||
1487 | return PLUGIN_USB_CONNECTED; | 1484 | return PLUGIN_USB_CONNECTED; |
1488 | } | ||
1489 | 1485 | ||
1490 | switch(button & ~(BUTTON_REPEAT)) | 1486 | switch(button & ~(BUTTON_REPEAT)) |
1491 | { | 1487 | { |
@@ -1885,7 +1881,7 @@ int main(char* filename) | |||
1885 | gray_show_display(false); /* switch off overlay */ | 1881 | gray_show_display(false); /* switch off overlay */ |
1886 | 1882 | ||
1887 | } | 1883 | } |
1888 | while (status > 0 && status != SYS_USB_CONNECTED); | 1884 | while (status != PLUGIN_OK && status != PLUGIN_USB_CONNECTED); |
1889 | 1885 | ||
1890 | gray_release_buffer(); /* deinitialize */ | 1886 | gray_release_buffer(); /* deinitialize */ |
1891 | 1887 | ||