mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
List filesizes next to filename in file listing
This commit is contained in:
parent
d855c84773
commit
b7a8b8f245
@ -38,7 +38,7 @@
|
|||||||
#include "driveOperations.h"
|
#include "driveOperations.h"
|
||||||
#include "nitrofs.h"
|
#include "nitrofs.h"
|
||||||
|
|
||||||
#define SCREEN_COLS 32
|
#define SCREEN_COLS 23
|
||||||
#define ENTRIES_PER_SCREEN 23
|
#define ENTRIES_PER_SCREEN 23
|
||||||
#define ENTRIES_START_ROW 1
|
#define ENTRIES_START_ROW 1
|
||||||
#define OPTIONS_ENTRIES_START_ROW 2
|
#define OPTIONS_ENTRIES_START_ROW 2
|
||||||
@ -168,6 +168,9 @@ void showDirectoryContents (const vector<DirEntry>& dirContents, int fileOffset,
|
|||||||
} else if (entry->isDirectory) {
|
} else if (entry->isDirectory) {
|
||||||
printf ("\x1b[%d;27H", i + ENTRIES_START_ROW);
|
printf ("\x1b[%d;27H", i + ENTRIES_START_ROW);
|
||||||
printf ("(dir)");
|
printf ("(dir)");
|
||||||
|
} else {
|
||||||
|
printf ("\x1b[%d;24H", i + ENTRIES_START_ROW);
|
||||||
|
printBytes((int)entry->size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,9 +452,9 @@ string browseForFile (void) {
|
|||||||
// Power saving loop. Only poll the keys once per frame and sleep the CPU if there is nothing else to do
|
// Power saving loop. Only poll the keys once per frame and sleep the CPU if there is nothing else to do
|
||||||
do {
|
do {
|
||||||
// Move to right side of screen
|
// Move to right side of screen
|
||||||
printf ("\x1b[0;27H");
|
printf ("\x1b[0;26H");
|
||||||
// Print time
|
// Print time
|
||||||
printf (RetTime().c_str());
|
printf ("_%s" ,RetTime().c_str());
|
||||||
|
|
||||||
scanKeys();
|
scanKeys();
|
||||||
pressed = keysDownRepeat();
|
pressed = keysDownRepeat();
|
||||||
@ -635,8 +638,8 @@ string browseForFile (void) {
|
|||||||
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
|
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
|
||||||
showDirectoryContents (dirContents, fileOffset, screenOffset);
|
showDirectoryContents (dirContents, fileOffset, screenOffset);
|
||||||
printf("\x1B[42m"); // Print green color for time text
|
printf("\x1B[42m"); // Print green color for time text
|
||||||
printf("\x1b[0;27H");
|
printf ("\x1b[0;26H");
|
||||||
printf(timeText);
|
printf ("_%s" ,timeText);
|
||||||
// Take bottom screenshot
|
// Take bottom screenshot
|
||||||
snprintf(snapPath, sizeof(snapPath), "%s:/gm9i/out/snap_%s_bot.bmp", (sdMounted ? "sd" : "fat"), fileTimeText);
|
snprintf(snapPath, sizeof(snapPath), "%s:/gm9i/out/snap_%s_bot.bmp", (sdMounted ? "sd" : "fat"), fileTimeText);
|
||||||
screenshotbmp(snapPath);
|
screenshotbmp(snapPath);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
bool yHeld = false;
|
bool yHeld = false;
|
||||||
|
|
||||||
snprintf(titleName, sizeof(titleName), "GodMode9i v%i.%i.%i", 1, 3, 2);
|
snprintf(titleName, sizeof(titleName), "GodMode9i v%i.%i.%i", 1, 3, 3);
|
||||||
|
|
||||||
// initialize video mode
|
// initialize video mode
|
||||||
videoSetMode(MODE_4_2D);
|
videoSetMode(MODE_4_2D);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user