mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-08 13:11:54 +00:00
(untested) should hide errors in scripts
This commit is contained in:
parent
d255dcf665
commit
e4ae9d9d7c
3 changed files with 11 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include "../../mem/heap.h"
|
#include "../../mem/heap.h"
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
|
|
||||||
|
int printerrors = true;
|
||||||
|
|
||||||
void gfx_clearscreen(){
|
void gfx_clearscreen(){
|
||||||
int battery = 0;
|
int battery = 0;
|
||||||
|
@ -43,6 +44,9 @@ int gfx_message(u32 color, const char* message, ...){
|
||||||
}
|
}
|
||||||
|
|
||||||
int gfx_errDisplay(char *src_func, int err, int loc){
|
int gfx_errDisplay(char *src_func, int err, int loc){
|
||||||
|
if (!printerrors)
|
||||||
|
return 0;
|
||||||
|
|
||||||
gfx_clearscreen();
|
gfx_clearscreen();
|
||||||
SWAPCOLOR(COLOR_ORANGE);
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
gfx_printf("\nAn error occured:\n\n");
|
gfx_printf("\nAn error occured:\n\n");
|
||||||
|
|
|
@ -12,4 +12,6 @@ int gfx_errDisplay(char *src_func, int err, int loc);
|
||||||
int gfx_makewaitmenu(char *hiddenmessage, int timer);
|
int gfx_makewaitmenu(char *hiddenmessage, int timer);
|
||||||
void gfx_printlength(int size, char *toprint);
|
void gfx_printlength(int size, char *toprint);
|
||||||
void gfx_printandclear(char *in, int length);
|
void gfx_printandclear(char *in, int length);
|
||||||
void gfx_printfilesize(int size, char *type);
|
void gfx_printfilesize(int size, char *type);
|
||||||
|
|
||||||
|
extern int printerrors;
|
|
@ -158,6 +158,7 @@ int ParsePart(){
|
||||||
gfx_printf("Parsing error...\nPress any key to continue");
|
gfx_printf("Parsing error...\nPress any key to continue");
|
||||||
btn_wait();
|
btn_wait();
|
||||||
forceExit = true;
|
forceExit = true;
|
||||||
|
printerrors = true;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +190,8 @@ void ParseScript(char* path){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printerrors = false;
|
||||||
|
|
||||||
while (!forceExit){
|
while (!forceExit){
|
||||||
currentchar = GetNextByte();
|
currentchar = GetNextByte();
|
||||||
|
|
||||||
|
@ -279,5 +282,6 @@ void ParseScript(char* path){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printerrors = true;
|
||||||
f_close(&in);
|
f_close(&in);
|
||||||
}
|
}
|
Loading…
Reference in a new issue