From a156cd25e1112753dd9dfd7b0092464fac3a6baf Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Fri, 5 Oct 2018 14:59:53 -0600 Subject: [PATCH] Show POWER button text on bottom --- arm9/source/driveMenu.cpp | 6 ++++-- arm9/source/file_browse.cpp | 6 ++++-- arm9/source/main.cpp | 7 +++++++ arm9/source/main.h | 5 +++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/arm9/source/driveMenu.cpp b/arm9/source/driveMenu.cpp index b5f4351..30bb0bd 100644 --- a/arm9/source/driveMenu.cpp +++ b/arm9/source/driveMenu.cpp @@ -60,16 +60,18 @@ void driveMenu (void) { printf ("[fat:] GAMECART\n"); printf ("(Flashcart FAT)"); } - iprintf ("\x1b[%i;0H", 23-isDSiMode()); + iprintf ("\x1b[%i;0H", 22-isDSiMode()); printf (titleName); if (isDSiMode()) { - printf ("\x1b[23;0H"); + printf ("\x1b[22;0H"); if (sdMounted) { printf ("R+B - Unmount SD card"); } else { printf ("R+B - Remount SD card"); } } + printf ("\x1b[23;0H"); + printf (isRegularDS ? POWERTEXT_DS : POWERTEXT); consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 15, 0, true, true); diff --git a/arm9/source/file_browse.cpp b/arm9/source/file_browse.cpp index a4fb8ca..15cb868 100644 --- a/arm9/source/file_browse.cpp +++ b/arm9/source/file_browse.cpp @@ -160,10 +160,12 @@ string browseForFile (void) { fileSize = getFileSize(entry->name.c_str()); printf ("%i Bytes", (int)fileSize); } - printf ("\x1b[22;0H"); + printf ("\x1b[21;0H"); printf (titleName); - printf ("\x1b[23;0H"); + printf ("\x1b[22;0H"); printf ("X - DELETE"); + printf ("\x1b[23;0H"); + printf (isRegularDS ? POWERTEXT_DS : POWERTEXT); consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 15, 0, true, true); showDirectoryContents (dirContents, screenOffset); diff --git a/arm9/source/main.cpp b/arm9/source/main.cpp index 236799a..4b329ad 100644 --- a/arm9/source/main.cpp +++ b/arm9/source/main.cpp @@ -39,6 +39,8 @@ char titleName[32] = {" "}; int screenMode = 0; +bool isRegularDS = true; + bool applaunch = false; static int bg3; @@ -103,6 +105,11 @@ int main(int argc, char **argv) { swiWaitForVBlank(); } + fifoWaitValue32(FIFO_USER_06); + u16 arm7_SNDEXCNT = fifoGetValue32(FIFO_USER_07); + if (arm7_SNDEXCNT != 0) isRegularDS = false; // If sound frequency setting is found, then the console is not a DS Phat/Lite + fifoSendValue32(FIFO_USER_07, 0); + /*if (!fatInitDefault()) { consoleClear(); iprintf ("fatinitDefault failed!\n"); diff --git a/arm9/source/main.h b/arm9/source/main.h index aa79e53..9f33b80 100644 --- a/arm9/source/main.h +++ b/arm9/source/main.h @@ -1,10 +1,15 @@ #ifndef MAIN_H #define MAIN_H +#define POWERTEXT_DS "POWER - Poweroff" +#define POWERTEXT "POWER - Reboot/[+held] Poweroff" + extern char titleName[32]; extern int screenMode; +extern bool isRegularDS; + extern bool applaunch;