Other scrolling method - fix hack (#122)

* other method: leave scrolling to icon updating function
downside: scroll can lag behind the selected entry if going too fast

* bring back looping so scrolling doesnt lag behind as much when going out of bounds
only about a second lag, then a second again for icons to load

* this method doesnt need to know the ids

* fix memory leak

* optimize for invisibility

* fix lockup when install checking threads are finished

* less magic, again
make icon loading functions/numbers more general

* increase wait time for fastcroll to give people more time to react, and to prevent some lag for the loading function
This commit is contained in:
LiquidFenrir
2017-12-31 05:01:31 +01:00
committed by Alex Taber
parent 841773d9e4
commit f65b32c90c
3 changed files with 107 additions and 142 deletions

View File

@@ -70,7 +70,6 @@ typedef struct {
ssize_t texture_id_offset;
ssize_t icons_ids[ICONS_OFFSET_AMOUNT][ENTRIES_PER_SCREEN];
ssize_t assoc_entry_ids[ICONS_OFFSET_AMOUNT][ENTRIES_PER_SCREEN];
int previous_scroll;
int scroll;
@@ -92,6 +91,7 @@ void delete_entry(Entry_s entry);
Result load_entries(const char * loading_path, Entry_List_s * list, EntryMode mode);
bool load_preview(Entry_List_s list, int * preview_offset);
void load_icons_first(Entry_List_s * current_list, bool silent);
void handle_scrolling(Entry_List_s * list);
void load_icons_thread(void * void_arg);
u32 load_data(char * filename, Entry_s entry, char ** buf);