From 9495bf30bfcd4d1fccd3345a9518339d0d93f2c3 Mon Sep 17 00:00:00 2001 From: LiquidFenrir Date: Sun, 5 Nov 2017 06:30:41 +0100 Subject: [PATCH] make jumping put the cursor at the top row downside: when jumping near the end, a blank is visible --- sysmodules/rosalina/source/menus/process_list.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysmodules/rosalina/source/menus/process_list.c b/sysmodules/rosalina/source/menus/process_list.c index 751d6ee..8dac268 100644 --- a/sysmodules/rosalina/source/menus/process_list.c +++ b/sysmodules/rosalina/source/menus/process_list.c @@ -203,6 +203,7 @@ static void ProcessListMenu_MemoryViewer(const ProcessInfo *info) void finishJumping(void) { menus[MENU_MODE_NORMAL].selected = __builtin_bswap32(gotoAddress); // The data is edited in reverse, so it needs to be swapped before usage + menus[MENU_MODE_NORMAL].starti = totalRows; } menus[MENU_MODE_GOTO].buf = (u8*)&gotoAddress; @@ -299,10 +300,8 @@ static void ProcessListMenu_MemoryViewer(const ProcessInfo *info) void handleScrolling(void) { - for(u32 i = 0; i < totalRows; i++) + for(u32 i = totalRows; i > 0 ; i--) { - if(totalRows <= ROWS_PER_SCREEN) - break; u32 scroll = menus[MENU_MODE_NORMAL].starti; u32 selectedRow = (menus[MENU_MODE_NORMAL].selected - (menus[MENU_MODE_NORMAL].selected % BYTES_PER_ROW))/BYTES_PER_ROW;