forked from Mirror/GodMode9
Fix mounting images from drives 8: / 9:
This commit is contained in:
parent
63b7604529
commit
78dbc95b60
@ -34,13 +34,21 @@ bool InitExtFS() {
|
||||
}
|
||||
|
||||
bool InitImgFS(const char* path) {
|
||||
// find drive # of the last image FAT drive
|
||||
u32 drv_i = NORM_FS - IMGN_FS;
|
||||
for (; drv_i < NORM_FS; drv_i++) {
|
||||
char fsname[8];
|
||||
snprintf(fsname, 7, "%lu:", drv_i);
|
||||
if (!(DriveType(fsname)&DRV_IMAGE))
|
||||
break;
|
||||
}
|
||||
// deinit image filesystem
|
||||
DismountDriveType(DRV_IMAGE);
|
||||
// (re)mount image, done if path == NULL
|
||||
MountImage(path);
|
||||
InitVirtualImageDrive();
|
||||
// reinit image filesystem
|
||||
for (u32 i = NORM_FS - IMGN_FS; i < NORM_FS; i++) {
|
||||
for (u32 i = NORM_FS - IMGN_FS; i < drv_i; i++) {
|
||||
char fsname[8];
|
||||
snprintf(fsname, 7, "%lu:", i);
|
||||
fs_mounted[i] = (f_mount(fs + i, fsname, 1) == FR_OK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user