Add fw dumping

- also fatfs is stupid
- also close files properly on a failed copy
- also check for errors during folder readouts
- also make sure holding vol- doesn't dump the keys anyway
This commit is contained in:
suchmememanyskill
2020-12-28 02:29:58 +01:00
parent 859ad2cc4c
commit 513bd804b1
18 changed files with 222 additions and 29 deletions

View File

@@ -19,6 +19,15 @@ void gfx_clearscreen(){
RESETCOLOR;
}
MenuEntry_t YesNoEntries[] = {
{.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "No"},
{.R = 255, .name = "Yes"}
};
int MakeYesNoHorzMenu(int spacesBetween, u32 bg){
return MakeHorizontalMenu(YesNoEntries, ARR_LEN(YesNoEntries), spacesBetween, bg);
}
int MakeHorizontalMenu(MenuEntry_t *entries, int len, int spacesBetween, u32 bg){
u32 initialX = 0, initialY = 0;
u32 highlight = 0;

View File

@@ -14,4 +14,5 @@
#define RGBUnionToU32(optionUnion) (optionUnion | 0xFF000000)
void gfx_clearscreen();
int MakeHorizontalMenu(MenuEntry_t *entries, int len, int spacesBetween, u32 bg);
int MakeHorizontalMenu(MenuEntry_t *entries, int len, int spacesBetween, u32 bg);
int MakeYesNoHorzMenu(int spacesBetween, u32 bg);