From 292c10048090cb35151ffdfc506157d0dbc9934b Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 4 Sep 2017 12:23:18 -0500 Subject: [PATCH 1/2] Implement fast scroll using circle pad. (#41) Not too fast yet not too slow either. --- source/main.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/source/main.c b/source/main.c index d482cea..55f4706 100644 --- a/source/main.c +++ b/source/main.c @@ -100,6 +100,7 @@ int main(void) { hidScanInput(); u32 kDown = hidKeysDown(); + u32 kHeld = hidKeysHeld(); if (qr_mode) { @@ -266,6 +267,37 @@ int main(void) if (selected_theme >= theme_count) selected_theme = theme_count-1; } } + // Fast scroll using circle pad + else if (kHeld & KEY_CPAD_UP) + { + svcSleepThread(100000000); + + if (splash_mode) + { + selected_splash--; + if (selected_splash < 0) + selected_splash = splash_count - 1; + } else { + selected_theme--; + if (selected_theme < 0) + selected_theme = theme_count - 1; + } + } + else if (kHeld & KEY_CPAD_DOWN) + { + svcSleepThread(100000000); + + if (splash_mode) + { + selected_splash++; + if (selected_splash >= splash_count) + selected_splash = 0; + } else { + selected_theme++; + if (selected_theme >= theme_count) + selected_theme = 0; + } + } if (!splash_mode && selected_theme != previously_selected) { From 242f10ec0a0d0bbe76bc24d7bc4876b6bad8e55c Mon Sep 17 00:00:00 2001 From: ZetaDesigns Date: Mon, 4 Sep 2017 19:31:44 +0200 Subject: [PATCH 2/2] Add QRCode reference --- source/draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/draw.c b/source/draw.c index 7eb78c3..8737740 100644 --- a/source/draw.c +++ b/source/draw.c @@ -206,7 +206,7 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t pp2d_draw_wtext(200, 180, 0.6, 0.6, COLOR_WHITE, L"\uE001 Queue Shuffle"); pp2d_draw_wtext(20, 210, 0.6, 0.6, COLOR_WHITE, L"\uE002 Install BGM"); pp2d_draw_wtext(200, 210, 0.6, 0.6, COLOR_WHITE, L"\uE003 Preview Theme"); - + pp2d_draw_wtext(130, 120, 0.6, 0.6, COLOR_WHITE, L"\uE005 Scan QRCode"); pp2d_draw_on(GFX_BOTTOM); // Scroll the menu up or down if the selected theme is out of its bounds