update bdk

Signed-off-by: Damien Zhao <zdm65477730@126.com>
This commit is contained in:
Damien Zhao
2023-02-25 00:33:58 +08:00
parent 06d55e6d87
commit cf553f87dd
129 changed files with 7997 additions and 5104 deletions

View File

@@ -6,7 +6,7 @@
#include "../hid/hid.h"
#include "../fs/menus/explorer.h"
#include <utils/btn.h>
#include <storage/nx_sd.h>
#include <storage/sd.h>
#include "tconf.h"
#include "../keys/keys.h"
#include "../storage/mountmanager.h"
@@ -99,7 +99,6 @@ void HandleSD(){
}
extern bool sd_mounted;
extern bool is_sd_inited;
extern int launch_payload(char *path);
@@ -113,7 +112,7 @@ void RebootToHekate(){
void MountOrUnmountSD(){
gfx_clearscreen();
if (sd_mounted)
if (sd_get_card_mounted())
sd_unmount();
else if (!sd_mount())
hidWait();
@@ -152,8 +151,8 @@ void EnterMainMenu(){
sd_unmount();
// // -- Exit --
mainMenuEntries[MainRebootAMS].hide = (!sd_mounted || !FileExists("sd:/atmosphere/reboot_payload.bin"));
mainMenuEntries[MainRebootHekate].hide = (!sd_mounted || !FileExists("sd:/bootloader/update.bin"));
mainMenuEntries[MainRebootAMS].hide = (!sd_get_card_mounted() || !FileExists("sd:/atmosphere/reboot_payload.bin"));
mainMenuEntries[MainRebootHekate].hide = (!sd_get_card_mounted() || !FileExists("sd:/bootloader/update.bin"));
mainMenuEntries[MainRebootRCM].hide = h_cfg.t210b01;
gfx_clearscreen();

View File

@@ -6,9 +6,10 @@
#include <libs/fatfs/ff.h>
#include "../keys/keys.h"
#include "../keys/nca.h"
#include <storage/nx_sd.h>
#include <storage/sd.h>
#include "../fs/fsutils.h"
#include <utils/util.h>
#include <display/di.h>
#include "../storage/mountmanager.h"
#include "../err.h"
#include <utils/sprintf.h>
@@ -176,7 +177,7 @@ void FormatSD(){
}
u8 *work = malloc(TConf.FSBuffSize);
res = f_fdisk_mod(0, plist, work);
res = f_fdisk(0, plist, work);
if (!res){
res = f_mkfs("sd:", FM_FAT32, 32768, work, TConf.FSBuffSize);
@@ -198,12 +199,10 @@ void FormatSD(){
hidWait();
}
extern bool sd_mounted;
void TakeScreenshot(){
static u32 timer = 0;
if (!TConf.minervaEnabled || !sd_mounted)
if (!TConf.minervaEnabled || !sd_get_card_mounted())
return;
if (timer + 3 < get_tmr_s())