Some changes to scroll algorithm

This commit is contained in:
2024-06-12 11:04:52 -04:00
parent 80dd00933b
commit 4669f13d05
3 changed files with 50 additions and 53 deletions

View File

@@ -126,6 +126,13 @@ static void stop_install_check(void)
}
}
static inline void wait_scroll(void)
{
released = true;
svcReleaseMutex(update_icons_mutex);
svcSleepThread(FASTSCROLL_WAIT);
}
static void exit_thread(void)
{
if(iconLoadingThread_arg.run_thread)
@@ -327,11 +334,7 @@ static void jump_menu(Entry_List_s * list)
if(button == SWKBD_BUTTON_CONFIRM)
{
list->selected_entry = atoi(numbuf) - 1;
list->scroll = list->selected_entry;
if(list->scroll >= list->entries_count - list->entries_loaded)
list->scroll = list->entries_count - list->entries_loaded - 1;
if (list->scroll < 0)
list->scroll = 0;
wait_scroll();
}
}
@@ -371,13 +374,6 @@ static void toggle_shuffle(Entry_List_s * list)
}
}
static inline void wait_scroll(void)
{
released = true;
svcReleaseMutex(update_icons_mutex);
svcSleepThread(FASTSCROLL_WAIT);
}
int main(void)
{
srand(time(NULL));