Show EMMC/EMUMMC GPT

This commit is contained in:
suchmememanyskill
2020-12-27 23:33:23 +01:00
parent 3307e975c9
commit 859ad2cc4c
7 changed files with 157 additions and 36 deletions

View File

@@ -17,7 +17,7 @@
MenuEntry_t topEntries[] = {
{.optionUnion = COLORTORGB(COLOR_GREEN) | SKIPBIT},
{.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Back"},
{.optionUnion = COLORTORGB(COLOR_ORANGE)},
{.optionUnion = COLORTORGB(COLOR_GREY) | SKIPBIT, .name = "Clipboard -> Current folder"},
{.optionUnion = COLORTORGB(COLOR_GREY) | SKIPBIT, .name = "Current folder options"}
};
@@ -44,6 +44,7 @@ void FileExplorer(char *path){
while (1){
topEntries[2].optionUnion = (TConf.explorerCopyMode != CMODE_None) ? (COLORTORGB(COLOR_ORANGE)) : (COLORTORGB(COLOR_GREY) | SKIPBIT);
topEntries[1].name = (!strcmp(storedPath, path)) ? "<- Exit explorer" : "<- Folder back";
gfx_clearscreen();
gfx_printf("Loading...\r");

View File

@@ -18,9 +18,9 @@ MenuEntry_t FileMenuEntries[] = {
{.optionUnion = COLORTORGB(COLOR_VIOLET) | SKIPBIT}, // For the file Attribs
{.optionUnion = HIDEBIT},
{.optionUnion = COLORTORGB(COLOR_WHITE), .name = "<- Back"},
{.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Copy to clipboard"},
{.optionUnion = COLORTORGB(COLOR_BLUE), .name = "\nCopy to clipboard"},
{.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Move to clipboard"},
{.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Rename file"},
{.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Rename file\n"},
{.optionUnion = COLORTORGB(COLOR_RED), .name = "Delete file"},
{.optionUnion = COLORTORGB(COLOR_GREEN), .name = "View hex"},
{.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Launch Payload"},
@@ -56,7 +56,7 @@ MenuEntry_t DeleteEntries[] = {
};
void DeleteFile(char *path, FSEntry_t entry){
gfx_con_setpos(384 + 16, 200 + 16 + 8 * 16);
gfx_con_setpos(384 + 16, 200 + 16 + 10 * 16);
SETCOLOR(COLOR_RED, COLOR_DARKGREY);
gfx_printf("Are you sure? ");
@@ -82,10 +82,10 @@ menuPaths FileMenuPaths[] = {
void FileMenu(char *path, FSEntry_t entry){
FileMenuEntries[1].name = entry.name;
FileMenuEntries[1].sizeUnion = entry.sizeUnion;
char attribs[15];
FileMenuEntries[0].sizeUnion = entry.sizeUnion;
char attribs[16];
char *attribList = GetFileAttribs(entry);
sprintf(attribs, "Attribs:%s", attribList);
sprintf(attribs, "Attribs:%s\n", attribList);
free(attribList);
FileMenuEntries[2].name = attribs;