1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-12-24 18:36:03 +00:00

Save bytes, add screenshots into main and more

- Also run script on bootup if a script called startup.te is found on the root of the sd
- Saved bytes by just disabling making exfat partitions, lol
This commit is contained in:
suchmememanyskill 2021-01-10 00:10:28 +01:00
parent 5485f5ca06
commit 3f80693d9e
8 changed files with 18 additions and 9 deletions

View file

@ -5929,6 +5929,7 @@ FRESULT f_mkfs (
#if FF_FS_EXFAT
if (fmt == FS_EXFAT) { /* Create an exFAT volume */
LEAVE_MKFS(FR_NO_FILESYSTEM); // Muh frii bytes
DWORD szb_bit, szb_case, sum, nb, cl;
WCHAR ch, si;
UINT j, st;

View file

@ -22,4 +22,6 @@ typedef struct {
};
u16 sizeUnion;
};
} FSEntry_t;
} FSEntry_t;
#define newFSEntry(filename) (FSEntry_t) {.name = filename}

View file

@ -83,7 +83,7 @@ void RunScript(char *path, FSEntry_t entry){
gfx_clearscreen();
scriptCtx_t ctx = createScriptCtx();
ctx.script = runLexar(script, size);
ctx.script = runLexer(script, size);
free(script);
dictVectorAdd(&ctx.varDict, newDict(CpyStr("_CWD"), (newVar(StringType, 0, .stringType = path))));

View file

@ -3,4 +3,5 @@
typedef void (*fileMenuPath)(char *path, FSEntry_t entry);
void FileMenu(char *path, FSEntry_t entry);
void FileMenu(char *path, FSEntry_t entry);
void RunScript(char *path, FSEntry_t entry);

View file

@ -24,10 +24,8 @@ Input_t *hidRead(){
if (controller->home)
RebootToPayloadOrRcm();
#ifdef TAKESCREENSHOT
if (controller->cap)
TakeScreenshot();
#endif
if (controller->cap)
TakeScreenshot();
inputs.buttons = controller->buttons;

View file

@ -52,6 +52,9 @@
#include "keys/keys.h"
#include "keys/keyfile.h"
#include "storage/mountmanager.h"
#include "fs/fsutils.h"
#include "fs/fstypes.h"
#include "fs/menus/filemenu.h"
hekate_config h_cfg;
@ -304,6 +307,10 @@ void ipl_main()
if (res == 0)
hidWait();
if (FileExists("sd:/startup.te"))
RunScript("sd:/", newFSEntry("startup.te"));
EnterMainMenu();
// Halt BPMP if we managed to get out of execution.

View file

@ -92,7 +92,7 @@ void lexarVectorClear(Vector_t *v){
#define ELIFC(c) else if (*in == c)
Vector_t runLexar(const char* in, u32 len) {
Vector_t runLexer(const char* in, u32 len) {
const char *start = in;
Vector_t vec = newVec(sizeof(lexarToken_t), 16);
// store last var for re-assignment

View file

@ -1,6 +1,6 @@
#pragma once
#include "types.h"
Vector_t runLexar(const char* in, u32 len);
Vector_t runLexer(const char* in, u32 len);
char lexarDebugGetTokenC(u8 tokenN);
void lexarVectorClear(Vector_t *v);