forked from len0rd/rockbox
Fixed behaviour when connecting USB, made scrolling a bit faster by not emptying the button queue every time
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4675 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7cdab5c91c
commit
3e00f527fe
1 changed files with 4 additions and 8 deletions
|
@ -1470,22 +1470,18 @@ int root_size;
|
|||
/* interactively scroll around the image */
|
||||
int scroll_bmp(struct t_disp* pdisp)
|
||||
{
|
||||
/*empty the button queue first, to avoid unwanted scrolling */
|
||||
while(rb->button_get(false) != BUTTON_NONE);
|
||||
|
||||
while (true)
|
||||
{
|
||||
int button;
|
||||
int move;
|
||||
|
||||
/* we're unfortunately slower than key repeat,
|
||||
so empty the button queue, to avoid post-scroll */
|
||||
while(rb->button_get(false) != BUTTON_NONE);
|
||||
|
||||
button = rb->button_get(true);
|
||||
|
||||
if (button == SYS_USB_CONNECTED)
|
||||
{
|
||||
gray_release_buffer(); /* switch off overlay and deinitialize */
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
}
|
||||
|
||||
switch(button & ~(BUTTON_REPEAT))
|
||||
{
|
||||
|
@ -1885,7 +1881,7 @@ int main(char* filename)
|
|||
gray_show_display(false); /* switch off overlay */
|
||||
|
||||
}
|
||||
while (status > 0 && status != SYS_USB_CONNECTED);
|
||||
while (status != PLUGIN_OK && status != PLUGIN_USB_CONNECTED);
|
||||
|
||||
gray_release_buffer(); /* deinitialize */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue