From 78791f7b6674765c4e3b913dd1f7e9179ca91b9e Mon Sep 17 00:00:00 2001 From: Duckbill Date: Mon, 25 Dec 2017 13:45:09 +0300 Subject: [PATCH] Paging fixes --- sysmodules/rosalina/source/menus/cheats.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysmodules/rosalina/source/menus/cheats.c b/sysmodules/rosalina/source/menus/cheats.c index c6f188e..cad08cf 100644 --- a/sysmodules/rosalina/source/menus/cheats.c +++ b/sysmodules/rosalina/source/menus/cheats.c @@ -1056,14 +1056,14 @@ void RosalinaMenu_Cheats(void) { && page * CHEATS_PER_MENU_PAGE + i < cheatCount; i++) { char buf[65] = { 0 }; - const char * checkbox = (cheats[i]->active ? "(x) " : "( ) "); - const char * keyAct = (cheats[i]->keyActivated ? "*" : " "); - sprintf(buf, "%s%s%s", checkbox, keyAct, cheats[i]->name); + s32 j = page * CHEATS_PER_MENU_PAGE + i; + const char * checkbox = (cheats[j]->active ? "(x) " : "( ) "); + const char * keyAct = (cheats[j]->keyActivated ? "*" : " "); + sprintf(buf, "%s%s%s", checkbox, keyAct, cheats[j]->name); Draw_DrawString(30, 30 + i * SPACING_Y, COLOR_WHITE, buf); Draw_DrawCharacter(10, 30 + i * SPACING_Y, COLOR_TITLE, - page * CHEATS_PER_MENU_PAGE + i == selected ? - '>' : ' '); + j == selected ? '>' : ' '); } Draw_FlushFramebuffer();