Skip to content

Commit

Permalink
Fix time text clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Oct 16, 2018
1 parent 7a9fcbe commit 4028963
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion arm9/source/driveMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ void gbaCartDump(void) {
int pressed = 0;

printf ("\x1b[0;27H");
printf (" "); // Clear time
printf ("\x1B[42m"); // Print green color
printf ("_____"); // Clear time
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
printf ("\x1B[47m"); // Print foreground white color
printf("Dump GBA cart ROM to\n");
printf("\"fat:/gm9i/out\"?\n");
printf("(<A> yes, <B> no)");
Expand Down
12 changes: 9 additions & 3 deletions arm9/source/file_browse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ int fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
int maxCursors = -1;

printf ("\x1b[0;27H");
printf (" "); // Clear time
printf ("\x1B[42m"); // Print green color
printf ("_____"); // Clear time
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
printf ("\x1B[47m"); // Print foreground white color
char fullPath[256];
snprintf(fullPath, sizeof(fullPath), "%s%s", path, entry->name.c_str());
printf(fullPath);
Expand Down Expand Up @@ -306,8 +308,10 @@ bool fileBrowse_paste(char path[PATH_MAX]) {
int maxCursors = -1;

printf ("\x1b[0;27H");
printf (" "); // Clear time
printf ("\x1B[42m"); // Print green color
printf ("_____"); // Clear time
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
printf ("\x1B[47m"); // Print foreground white color
printf("Paste file here?\n\n");
iprintf ("\x1b[%d;0H", OPTIONS_ENTRIES_START_ROW);
maxCursors++;
Expand Down Expand Up @@ -507,8 +511,10 @@ string browseForFile (void) {
// Delete file/folder
if ((pressed & KEY_X) && (strcmp (entry->name.c_str(), "..") != 0) && (strncmp (path, "nitro:/", 7) != 0)) {
printf ("\x1b[0;27H");
printf (" "); // Clear time
printf ("\x1B[42m"); // Print green color
printf ("_____"); // Clear time
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
printf ("\x1B[47m"); // Print foreground white color
iprintf("Delete \"%s\"?\n", entry->name.c_str());
printf ("(<A> yes, <B> no)");
while (true) {
Expand Down

0 comments on commit 4028963

Please sign in to comment.