From 4401238766eeeb52946c3bf1d0229b140f595605 Mon Sep 17 00:00:00 2001 From: Narayan <117493082+narayanx@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:31:02 -0700 Subject: [PATCH] ZL switching wasn't working fixed, also made pause/play with L+R work if R pressed first, resolving: https://github.com/deltabeard/ctrmus/issues/78 --- source/main.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/source/main.c b/source/main.c index 54ba67f..b712306 100644 --- a/source/main.c +++ b/source/main.c @@ -288,6 +288,10 @@ err: goto out; } +void pausePlay() { + +} + int main(int argc, char **argv) { PrintConsole topScreenLog, topScreenInfo, bottomScreen; @@ -433,6 +437,22 @@ int main(int argc, char **argv) // continue; // } } + // if R is pressed first + if ((kHeld & KEY_R) && (kDown & KEY_L)) + { + if(isPlaying() == false) + continue; + + consoleSelect(&topScreenLog); + if(togglePlayback() == true) + puts("Paused"); + else + puts("Playing"); + + keyLComboPressed = true; + keyRComboPressed = true; + continue; + } if((kDown & KEY_UP || ((kHeld & KEY_UP) && (osGetTime() - mill > 500))) && @@ -588,7 +608,7 @@ int main(int argc, char **argv) } keyLComboPressed = false; } - bool goToPrevFile = (kDown & KEY_ZR) || keyLActivation; + bool goToPrevFile = (kDown & KEY_ZL) || keyLActivation; // don't go to ../ if (goToPrevFile && fileNum > 1) { fileNum -= 1;