mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(Filebrowser) Cleanups
This commit is contained in:
parent
da9a47dfa2
commit
cd25e8b7c9
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user