mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-22 20:06:43 +00:00
Change some more functions to accept the new input
This commit is contained in:
parent
0d98f65f99
commit
2cac144ba8
11 changed files with 26 additions and 21 deletions
|
@ -40,8 +40,11 @@ Inputs *hidRead(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
u32 x, y;
|
||||||
|
gfx_con_getpos(&x, &y);
|
||||||
gfx_con_setpos(1008, 703);
|
gfx_con_setpos(1008, 703);
|
||||||
gfx_printf("%k%K%s %s MISS%k%K", COLOR_DEFAULT, COLOR_WHITE, (controller->conn_l) ? " " : "JOYL", (controller->conn_r) ? " " : "JOYR", COLOR_WHITE, COLOR_DEFAULT);
|
gfx_printf("%k%K%s %s MISS%k%K", COLOR_DEFAULT, COLOR_WHITE, (controller->conn_l) ? " " : "JOYL", (controller->conn_r) ? " " : "JOYR", COLOR_WHITE, COLOR_DEFAULT);
|
||||||
|
gfx_con_setpos(x, y);
|
||||||
errPrint = true;
|
errPrint = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "../../utils/types.h"
|
#include "../../utils/types.h"
|
||||||
#include "../../libs/fatfs/ff.h"
|
#include "../../libs/fatfs/ff.h"
|
||||||
#include "../../utils/sprintf.h"
|
#include "../../utils/sprintf.h"
|
||||||
#include "../../utils/btn.h"
|
|
||||||
#include "../../gfx/gfx.h"
|
#include "../../gfx/gfx.h"
|
||||||
#include "../../utils/util.h"
|
#include "../../utils/util.h"
|
||||||
#include "../../hos/pkg1.h"
|
#include "../../hos/pkg1.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
#include "../../libs/fatfs/ff.h"
|
#include "../../libs/fatfs/ff.h"
|
||||||
#include "../../utils/sprintf.h"
|
#include "../../utils/sprintf.h"
|
||||||
#include "../../utils/btn.h"
|
|
||||||
#include "../../mem/heap.h"
|
#include "../../mem/heap.h"
|
||||||
#include "../../storage/nx_emmc.h"
|
#include "../../storage/nx_emmc.h"
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
|
@ -72,8 +71,8 @@ int existsCheck(char *path){
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
if (fsutil_checkfile(path)){
|
if (fsutil_checkfile(path)){
|
||||||
gfx_printf("File already exists! Overwrite?\nVol +/- to cancel\n");
|
gfx_printf("File already exists! Overwrite?\nBto cancel\n");
|
||||||
res = gfx_makewaitmenu("Power to continue", 3);
|
res = gfx_makewaitmenu("A to continue", 3);
|
||||||
gfx_printf("\r \r");
|
gfx_printf("\r \r");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
#include "../../libs/fatfs/ff.h"
|
#include "../../libs/fatfs/ff.h"
|
||||||
#include "../../utils/sprintf.h"
|
#include "../../utils/sprintf.h"
|
||||||
#include "../../utils/btn.h"
|
|
||||||
#include "../../mem/heap.h"
|
#include "../../mem/heap.h"
|
||||||
#include "../../storage/nx_emmc.h"
|
#include "../../storage/nx_emmc.h"
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
|
@ -57,10 +56,10 @@ int emmcRestorePart(char *path, sdmmc_storage_t *mmcstorage, emmc_part_t *part){
|
||||||
|
|
||||||
if (totalSize < totalSizeDest){
|
if (totalSize < totalSizeDest){
|
||||||
SWAPCOLOR(COLOR_ORANGE);
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
gfx_printf("File is too small for destination.\nDo you want to flash it anyway?\n\nVol +/- to Cancel\n");
|
gfx_printf("File is too small for destination.\nDo you want to flash it anyway?\n\nB to Cancel\n");
|
||||||
u8 btnres = gfx_makewaitmenu(
|
u8 btnres = gfx_makewaitmenu(
|
||||||
"Power to Confirm",
|
"A to Confirm",
|
||||||
2
|
3
|
||||||
);
|
);
|
||||||
|
|
||||||
RESETCOLOR;
|
RESETCOLOR;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "entrymenu.h"
|
#include "entrymenu.h"
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
#include "../../libs/fatfs/ff.h"
|
#include "../../libs/fatfs/ff.h"
|
||||||
#include "../../utils/btn.h"
|
|
||||||
#include "../../gfx/gfx.h"
|
#include "../../gfx/gfx.h"
|
||||||
#include "fsutils.h"
|
#include "fsutils.h"
|
||||||
#include "fsactions.h"
|
#include "fsactions.h"
|
||||||
|
@ -25,8 +24,8 @@ extern int launch_payload(char *path);
|
||||||
int delfile(const char *path, const char *filename){
|
int delfile(const char *path, const char *filename){
|
||||||
gfx_clearscreen();
|
gfx_clearscreen();
|
||||||
SWAPCOLOR(COLOR_ORANGE);
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
gfx_printf("Are you sure you want to delete:\n%s\n\nPress vol+/- to cancel\n", filename);
|
gfx_printf("Are you sure you want to delete:\n%s\n\nPress B to cancel\n", filename);
|
||||||
if (gfx_makewaitmenu("Press power to delete", 3)){
|
if (gfx_makewaitmenu("Press A to delete", 3)){
|
||||||
f_unlink(path);
|
f_unlink(path);
|
||||||
fsreader_readfolder(currentpath);
|
fsreader_readfolder(currentpath);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -177,7 +176,7 @@ int filemenu(menu_entry file){
|
||||||
gfx_clearscreen();
|
gfx_clearscreen();
|
||||||
extract_bis_file(fsutil_getnextloc(currentpath, file.name), currentpath);
|
extract_bis_file(fsutil_getnextloc(currentpath, file.name), currentpath);
|
||||||
fsreader_readfolder(currentpath);
|
fsreader_readfolder(currentpath);
|
||||||
btn_wait();
|
hidWait();
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "../gfx/gfxutils.h"
|
#include "../gfx/gfxutils.h"
|
||||||
#include "../utils/utils.h"
|
#include "../utils/utils.h"
|
||||||
#include "../../mem/heap.h"
|
#include "../../mem/heap.h"
|
||||||
#include "../../utils/btn.h"
|
#include "../../hid/hid.h"
|
||||||
#include "fsutils.h"
|
#include "fsutils.h"
|
||||||
|
|
||||||
int fsact_copy(const char *locin, const char *locout, u8 options){
|
int fsact_copy(const char *locin, const char *locout, u8 options){
|
||||||
|
@ -71,7 +71,7 @@ int fsact_copy(const char *locin, const char *locout, u8 options){
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
if (options & COPY_MODE_CANCEL)
|
if (options & COPY_MODE_CANCEL)
|
||||||
if (btn_read() & BTN_VOL_DOWN){
|
if (hidRead()->buttons & (KEY_VOLP | KEY_VOLM)){
|
||||||
f_unlink(locout);
|
f_unlink(locout);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
#include "../../libs/fatfs/ff.h"
|
#include "../../libs/fatfs/ff.h"
|
||||||
#include "../../utils/sprintf.h"
|
#include "../../utils/sprintf.h"
|
||||||
#include "../../utils/btn.h"
|
|
||||||
#include "../../mem/heap.h"
|
#include "../../mem/heap.h"
|
||||||
#include "../../storage/nx_emmc.h"
|
#include "../../storage/nx_emmc.h"
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
|
|
|
@ -46,8 +46,10 @@ void createfileobjects(int size, menu_entry **menu){
|
||||||
}
|
}
|
||||||
|
|
||||||
void addobject(char* name, int spot, u8 attribs){
|
void addobject(char* name, int spot, u8 attribs){
|
||||||
|
/*
|
||||||
u64 size = 0;
|
u64 size = 0;
|
||||||
int sizes = 0;
|
int sizes = 0;
|
||||||
|
*/
|
||||||
fsreader_files[spot].property = 0;
|
fsreader_files[spot].property = 0;
|
||||||
|
|
||||||
if (fsreader_files[spot].name != NULL){
|
if (fsreader_files[spot].name != NULL){
|
||||||
|
|
|
@ -178,4 +178,12 @@ void gfx_drawScrollBar(int minView, int maxView, int count){
|
||||||
gfx_boxGrey(740, 16 + offsetSize, 755, 702, 0x66);
|
gfx_boxGrey(740, 16 + offsetSize, 755, 702, 0x66);
|
||||||
else
|
else
|
||||||
gfx_boxGrey(740, 16 + offsetSize, 755, 16 + barSize + offsetSize, 0x66);
|
gfx_boxGrey(740, 16 + offsetSize, 755, 16 + barSize + offsetSize, 0x66);
|
||||||
|
}
|
||||||
|
|
||||||
|
int gfx_defaultWaitMenu(char *message, int time){
|
||||||
|
gfx_clearscreen();
|
||||||
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
|
gfx_printf("\n%s\n\nPress B to return\n", message);
|
||||||
|
SWAPCOLOR(COLOR_RED);
|
||||||
|
return gfx_makewaitmenu("Press A to continue", time);
|
||||||
}
|
}
|
|
@ -18,5 +18,6 @@ u32 gfx_sideGetY();
|
||||||
void gfx_sideprintf(char* message, ...);
|
void gfx_sideprintf(char* message, ...);
|
||||||
void gfx_sideprintandclear(char* message, int length);
|
void gfx_sideprintandclear(char* message, int length);
|
||||||
void gfx_drawScrollBar(int minView, int maxView, int count);
|
void gfx_drawScrollBar(int minView, int maxView, int count);
|
||||||
|
int gfx_defaultWaitMenu(char *message, int time);
|
||||||
|
|
||||||
extern int printerrors;
|
extern int printerrors;
|
|
@ -36,9 +36,7 @@ void MainMenu_SDCard(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenu_EMMC(){
|
void MainMenu_EMMC(){
|
||||||
gfx_clearscreen();
|
if (gfx_defaultWaitMenu("You're about to enter EMMC\nModifying anything here can result in a BRICK!\n\nPlease only continue if you know what you're doing", 4)){
|
||||||
gfx_printf("You're about to enter EMMC\nModifying anything here\n can result in a BRICK!\n\nPlease only continue\n if you know what you're doing\n\nPress B to return\n");
|
|
||||||
if (gfx_makewaitmenu("Press A to enter", 4)){
|
|
||||||
/*
|
/*
|
||||||
connect_mmc(SYSMMC);
|
connect_mmc(SYSMMC);
|
||||||
|
|
||||||
|
@ -91,9 +89,7 @@ void MainMenu_SDFormat(){
|
||||||
res = menu_make(mainmenu_format, 3, "-- Format Menu --");
|
res = menu_make(mainmenu_format, 3, "-- Format Menu --");
|
||||||
|
|
||||||
if (res > 0){
|
if (res > 0){
|
||||||
gfx_clearscreen();
|
if(gfx_defaultWaitMenu("Are you sure you want to format your sd?\nThis will delete everything on your SD card!\nThis action is irreversible!", 10)){
|
||||||
gfx_printf("Are you sure you want to format your sd?\nThis will delete everything on your SD card\nThis action is irreversible!\n\nPress B to cancel\n");
|
|
||||||
if(gfx_makewaitmenu("Press A to continue", 10)){
|
|
||||||
if (format(res)){
|
if (format(res)){
|
||||||
sd_unmount();
|
sd_unmount();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue