(Filebrowser) Cleanups

This commit is contained in:
twinaphex 2012-08-02 16:27:40 +02:00
parent da9a47dfa2
commit cd25e8b7c9
3 changed files with 0 additions and 18 deletions

View File

@ -182,22 +182,10 @@ bool filebrowser_iterate(filebrowser_t *filebrowser, filebrowser_action_t action
else
filebrowser->current_dir.ptr -= entries_to_scroll;
break;
case FILEBROWSER_ACTION_SCROLL_UP_SMOOTH:
if (filebrowser->current_dir.ptr <= 50)
filebrowser->current_dir.ptr= 0;
else
filebrowser->current_dir.ptr -= 50;
break;
case FILEBROWSER_ACTION_SCROLL_DOWN:
filebrowser->current_dir.ptr = (min(filebrowser->current_dir.ptr +
entries_to_scroll, filebrowser->current_dir.list->size-1));
break;
case FILEBROWSER_ACTION_SCROLL_DOWN_SMOOTH:
filebrowser->current_dir.ptr = (min(filebrowser->current_dir.ptr + 50,
filebrowser->current_dir.list->size-1));
if(!filebrowser->current_dir.ptr)
filebrowser->current_dir.ptr = 0;
break;
case FILEBROWSER_ACTION_OK:
ret = filebrowser_push_directory(filebrowser, filebrowser_get_current_path(filebrowser), true);
break;

View File

@ -44,9 +44,7 @@ typedef enum
FILEBROWSER_ACTION_OK,
FILEBROWSER_ACTION_CANCEL,
FILEBROWSER_ACTION_SCROLL_UP,
FILEBROWSER_ACTION_SCROLL_UP_SMOOTH,
FILEBROWSER_ACTION_SCROLL_DOWN,
FILEBROWSER_ACTION_SCROLL_DOWN_SMOOTH,
FILEBROWSER_ACTION_RESET,
FILEBROWSER_ACTION_NOOP
} filebrowser_action_t;

View File

@ -101,10 +101,6 @@ static void browser_update(filebrowser_t * b, uint16_t input, const char *extens
action = FILEBROWSER_ACTION_LEFT;
else if (input & (1 << RETRO_DEVICE_ID_JOYPAD_R))
action = FILEBROWSER_ACTION_SCROLL_DOWN;
else if (input & (1 << RETRO_DEVICE_ID_JOYPAD_R2))
action = FILEBROWSER_ACTION_SCROLL_DOWN_SMOOTH;
else if (input & (1 << RETRO_DEVICE_ID_JOYPAD_L2))
action = FILEBROWSER_ACTION_SCROLL_UP_SMOOTH;
else if (input & (1 << RETRO_DEVICE_ID_JOYPAD_L))
action = FILEBROWSER_ACTION_SCROLL_UP;
else if (input & (1 << RETRO_DEVICE_ID_JOYPAD_A))