1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-26 05:42:07 +00:00

Add script button stuff

This commit is contained in:
Such Meme, Many Skill 2020-05-02 13:33:54 +02:00
parent 83e6bf7090
commit 0d98f65f99
4 changed files with 34 additions and 15 deletions

View file

@ -49,7 +49,6 @@ void _printentry(menu_entry *entry, bool highlighted, bool refresh, char *path){
break; break;
} }
/* /*
if (highlighted){ if (highlighted){
SWAPBGCOLOR(COLOR_WHITE); SWAPBGCOLOR(COLOR_WHITE);

View file

@ -6,7 +6,7 @@
#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 "../../hid/hid.h"
#include "../../gfx/gfx.h" #include "../../gfx/gfx.h"
#include "../../utils/util.h" #include "../../utils/util.h"
#include "../../storage/emummc.h" #include "../../storage/emummc.h"
@ -269,17 +269,21 @@ int part_MountMMC(){
} }
int part_Pause(){ int part_Pause(){
int res; Inputs *input = hidWait();
while (btn_read() != 0); str_int_add("@BTN_POWER", input->pow);
str_int_add("@BTN_VOL+", input->volp);
str_int_add("@BTN_VOL-", input->volm);
str_int_add("@BTN_A", input->a);
str_int_add("@BTN_B", input->b);
str_int_add("@BTN_X", input->x);
str_int_add("@BTN_Y", input->y);
str_int_add("@BTN_UP", input->Lup);
str_int_add("@BTN_DOWN", input->Ldown);
str_int_add("@BTN_LEFT", input->Lleft);
str_int_add("@BTN_RIGHT", input->Lright);
res = btn_wait(); return input->buttons;
str_int_add("@BTN_POWER", (res & BTN_POWER));
str_int_add("@BTN_VOL+", (res & BTN_VOL_UP));
str_int_add("@BTN_VOL-", (res & BTN_VOL_DOWN));
return res;
} }
int part_addstrings(){ int part_addstrings(){

View file

@ -287,9 +287,6 @@ void runScript(char *path){
//add builtin vars //add builtin vars
str_int_add("@EMUMMC", emu_cfg.enabled); str_int_add("@EMUMMC", emu_cfg.enabled);
str_int_add("@RESULT", 0); str_int_add("@RESULT", 0);
str_int_add("@BTN_POWER", 0);
str_int_add("@BTN_VOL+", 0);
str_int_add("@BTN_VOL-", 0);
str_str_add("$CURRENTPATH", currentpath); str_str_add("$CURRENTPATH", currentpath);
//str_int_printall(); //str_int_printall();

View file

@ -4,6 +4,12 @@
#include "../gfx/menu.h" #include "../gfx/menu.h"
#include "../../storage/emummc.h" #include "../../storage/emummc.h"
#include "../../mem/heap.h" #include "../../mem/heap.h"
/*
#include "../../utils/util.h"
#include "../../utils/sprintf.h"
#include "../../libs/fatfs/ff.h"
#include "../fs/fsutils.h"
*/
int utils_mmcMenu(){ int utils_mmcMenu(){
if (emu_cfg.enabled) if (emu_cfg.enabled)
@ -17,3 +23,16 @@ void utils_copystring(const char *in, char **out){
*out = (char *) malloc (len); *out = (char *) malloc (len);
strcpy(*out, in); strcpy(*out, in);
} }
/*
void utils_takeScreenshot(){
char *name, *path;
char basepath[] = "sd:/tegraexplorer/screenshots";
name = malloc(35);
sprintf(name, "Screenshot_%d", get_tmr_s());
f_mkdir("sd:/tegraexplorer");
f_mkdir(basepath);
path = fsutil_getnextloc(basepath, name);
}
*/