From 6c2d0cf162c1fd212dc877e2e94d9e41035ec52d Mon Sep 17 00:00:00 2001 From: "Such Meme, Many Skill" Date: Sun, 3 May 2020 00:30:05 +0200 Subject: [PATCH] small fixes --- source/hid/hid.c | 7 ++++--- source/tegraexplorer/fs/filemenu.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/hid/hid.c b/source/hid/hid.c index 4434e0c..d2dd5ab 100644 --- a/source/hid/hid.c +++ b/source/hid/hid.c @@ -84,12 +84,13 @@ Inputs *hidRead(){ Inputs *hidWaitMask(u32 mask){ Inputs *in = hidRead(); - while (in->buttons) + while (in->buttons & mask) hidRead(); - while ((in->buttons & mask) == 0){ - in = hidRead(); + while (!(in->buttons & mask)){ + hidRead(); } + return in; } diff --git a/source/tegraexplorer/fs/filemenu.c b/source/tegraexplorer/fs/filemenu.c index dfc82b3..bbd3310 100644 --- a/source/tegraexplorer/fs/filemenu.c +++ b/source/tegraexplorer/fs/filemenu.c @@ -191,9 +191,11 @@ int filemenu(menu_entry file){ break; case FILE_SCRIPT: //ParseScript(fsutil_getnextloc(currentpath, file.name)); + /* gfx_printf(" %kRelease any buttons if held!", COLOR_RED); while (hidRead()->buttons); + */ runScript(fsutil_getnextloc(currentpath, file.name)); fsreader_readfolder(currentpath);