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:
parent
83e6bf7090
commit
0d98f65f99
4 changed files with 34 additions and 15 deletions
|
@ -49,7 +49,6 @@ void _printentry(menu_entry *entry, bool highlighted, bool refresh, char *path){
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (highlighted){
|
||||
SWAPBGCOLOR(COLOR_WHITE);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "../../utils/types.h"
|
||||
#include "../../libs/fatfs/ff.h"
|
||||
#include "../../utils/sprintf.h"
|
||||
#include "../../utils/btn.h"
|
||||
#include "../../hid/hid.h"
|
||||
#include "../../gfx/gfx.h"
|
||||
#include "../../utils/util.h"
|
||||
#include "../../storage/emummc.h"
|
||||
|
@ -269,17 +269,21 @@ int part_MountMMC(){
|
|||
}
|
||||
|
||||
int part_Pause(){
|
||||
int res;
|
||||
Inputs *input = hidWait();
|
||||
|
||||
while (btn_read() != 0);
|
||||
|
||||
res = btn_wait();
|
||||
|
||||
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));
|
||||
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);
|
||||
|
||||
return res;
|
||||
return input->buttons;
|
||||
}
|
||||
|
||||
int part_addstrings(){
|
||||
|
|
|
@ -287,9 +287,6 @@ void runScript(char *path){
|
|||
//add builtin vars
|
||||
str_int_add("@EMUMMC", emu_cfg.enabled);
|
||||
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_int_printall();
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
#include "../gfx/menu.h"
|
||||
#include "../../storage/emummc.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(){
|
||||
if (emu_cfg.enabled)
|
||||
|
@ -16,4 +22,17 @@ void utils_copystring(const char *in, char **out){
|
|||
int len = strlen(in) + 1;
|
||||
*out = (char *) malloc (len);
|
||||
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);
|
||||
}
|
||||
*/
|
Loading…
Reference in a new issue