From 7191743f5d8758695d8e2ddb37d649ad68191eed Mon Sep 17 00:00:00 2001 From: "Such Meme, Many Skill" Date: Thu, 19 Mar 2020 00:11:18 +0100 Subject: [PATCH] Reorganise emmc.c/h and rename main menu c file --- source/main.c | 2 +- source/tegraexplorer/{ => emmc}/emmc.c | 42 +++++++++++------------ source/tegraexplorer/{ => emmc}/emmc.h | 1 + source/tegraexplorer/{te.c => mainmenu.c} | 4 +-- source/tegraexplorer/{te.h => mainmenu.h} | 3 +- source/tegraexplorer/utils/script.c | 2 +- source/tegraexplorer/utils/tools.c | 2 +- 7 files changed, 29 insertions(+), 27 deletions(-) rename source/tegraexplorer/{ => emmc}/emmc.c (90%) rename source/tegraexplorer/{ => emmc}/emmc.h (98%) rename source/tegraexplorer/{te.c => mainmenu.c} (99%) rename source/tegraexplorer/{te.h => mainmenu.h} (99%) diff --git a/source/main.c b/source/main.c index eaf89dd..51f5378 100644 --- a/source/main.c +++ b/source/main.c @@ -38,7 +38,7 @@ #include "utils/dirlist.h" #include "utils/sprintf.h" #include "utils/util.h" -#include "tegraexplorer/te.h" +#include "tegraexplorer/mainmenu.h" //#include "keys/keys.h" diff --git a/source/tegraexplorer/emmc.c b/source/tegraexplorer/emmc/emmc.c similarity index 90% rename from source/tegraexplorer/emmc.c rename to source/tegraexplorer/emmc/emmc.c index 27fa998..6d9b349 100644 --- a/source/tegraexplorer/emmc.c +++ b/source/tegraexplorer/emmc/emmc.c @@ -1,26 +1,26 @@ #include -#include "../mem/heap.h" #include "emmc.h" -#include "../utils/types.h" -#include "../libs/fatfs/ff.h" -#include "../utils/sprintf.h" -#include "../utils/btn.h" -#include "../gfx/gfx.h" -#include "../utils/util.h" -#include "../hos/pkg1.h" -#include "../storage/sdmmc.h" -#include "../storage/nx_emmc.h" -#include "../sec/tsec.h" -#include "../soc/t210.h" -#include "../soc/fuse.h" -#include "../mem/mc.h" -#include "../sec/se.h" -#include "../soc/hw_init.h" -#include "../mem/emc.h" -#include "../mem/sdram.h" -#include "../storage/emummc.h" -#include "../config/config.h" -#include "common/common.h" +#include "../../mem/heap.h" +#include "../../utils/types.h" +#include "../../libs/fatfs/ff.h" +#include "../../utils/sprintf.h" +#include "../../utils/btn.h" +#include "../../gfx/gfx.h" +#include "../../utils/util.h" +#include "../../hos/pkg1.h" +#include "../../storage/sdmmc.h" +#include "../../storage/nx_emmc.h" +#include "../../sec/tsec.h" +#include "../../soc/t210.h" +#include "../../soc/fuse.h" +#include "../../mem/mc.h" +#include "../../sec/se.h" +#include "../../soc/hw_init.h" +#include "../../mem/emc.h" +#include "../../mem/sdram.h" +#include "../../storage/emummc.h" +#include "../../config/config.h" +#include "../common/common.h" sdmmc_storage_t storage; emmc_part_t *system_part; diff --git a/source/tegraexplorer/emmc.h b/source/tegraexplorer/emmc/emmc.h similarity index 98% rename from source/tegraexplorer/emmc.h rename to source/tegraexplorer/emmc/emmc.h index db75470..5410bb4 100644 --- a/source/tegraexplorer/emmc.h +++ b/source/tegraexplorer/emmc/emmc.h @@ -1,4 +1,5 @@ #pragma once +#include "../../utils/types.h" typedef struct _pkg1_info { short ver; diff --git a/source/tegraexplorer/te.c b/source/tegraexplorer/mainmenu.c similarity index 99% rename from source/tegraexplorer/te.c rename to source/tegraexplorer/mainmenu.c index faff565..9561d51 100644 --- a/source/tegraexplorer/te.c +++ b/source/tegraexplorer/mainmenu.c @@ -1,10 +1,10 @@ #include #include -#include "te.h" +#include "mainmenu.h" #include "../utils/util.h" #include "utils/tools.h" #include "../utils/btn.h" -#include "emmc.h" +#include "emmc/emmc.h" #include "../storage/emummc.h" #include "utils/script.h" diff --git a/source/tegraexplorer/te.h b/source/tegraexplorer/mainmenu.h similarity index 99% rename from source/tegraexplorer/te.h rename to source/tegraexplorer/mainmenu.h index 54bf50b..fd43f23 100644 --- a/source/tegraexplorer/te.h +++ b/source/tegraexplorer/mainmenu.h @@ -4,6 +4,7 @@ #define MAINMENU_AMOUNT 12 #define CREDITS_MESSAGE "\nTegraexplorer, made by:\nSuch Meme, Many Skill\n\nProject based on:\nLockpick_RCM\nHekate\n\nCool people:\nshchmue\ndennthecafebabe\nDax" +/* typedef struct _menu_item { char name[50]; u32 color; @@ -11,7 +12,7 @@ typedef struct _menu_item { short property; } menu_item; -/* + enum mainmenu_return { SD_CARD = 1, EMMC_SAF, diff --git a/source/tegraexplorer/utils/script.c b/source/tegraexplorer/utils/script.c index 27b3aa4..6c1d8f9 100644 --- a/source/tegraexplorer/utils/script.c +++ b/source/tegraexplorer/utils/script.c @@ -1,7 +1,7 @@ #include #include "../../mem/heap.h" #include "../gfx/gfxutils.h" -#include "../emmc.h" +#include "../emmc/emmc.h" #include "../../utils/types.h" #include "../../libs/fatfs/ff.h" #include "../../utils/sprintf.h" diff --git a/source/tegraexplorer/utils/tools.c b/source/tegraexplorer/utils/tools.c index 86217ee..053df5f 100644 --- a/source/tegraexplorer/utils/tools.c +++ b/source/tegraexplorer/utils/tools.c @@ -10,7 +10,7 @@ #include "../../storage/sdmmc.h" #include "../../utils/sprintf.h" #include "../../soc/fuse.h" -#include "../emmc.h" +#include "../emmc/emmc.h" #include "../common/common.h" #include "../fs/fsactions.h"