mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-22 20:06:43 +00:00
make sure sd space > emummc
This commit is contained in:
parent
f1d433e69a
commit
e1350de346
1 changed files with 7 additions and 1 deletions
|
@ -167,15 +167,21 @@ void FormatSD(){
|
||||||
|
|
||||||
emummc = !(res - 1);
|
emummc = !(res - 1);
|
||||||
|
|
||||||
|
SETCOLOR(COLOR_RED, COLOR_DEFAULT);
|
||||||
|
|
||||||
plist[0] = sd_storage.csd.capacity;
|
plist[0] = sd_storage.csd.capacity;
|
||||||
if (emummc){
|
if (emummc){
|
||||||
|
if (plist[0] < 83886080){
|
||||||
|
gfx_printf("\n\nYou seem to be running this on a 32GB or smaller SD\nNot enough free space for emummc!");
|
||||||
|
hidWait();
|
||||||
|
return;
|
||||||
|
}
|
||||||
plist[0] -= 61145088;
|
plist[0] -= 61145088;
|
||||||
u32 allignedSectors = plist[0] - plist[0] % 2048;
|
u32 allignedSectors = plist[0] - plist[0] % 2048;
|
||||||
plist[1] = 61145088 + plist[0] % 2048;
|
plist[1] = 61145088 + plist[0] % 2048;
|
||||||
plist[0] = allignedSectors;
|
plist[0] = allignedSectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
SETCOLOR(COLOR_RED, COLOR_DEFAULT);
|
|
||||||
gfx_printf("\n\nAre you sure you want to format your sd?\nThis will delete everything on your SD card!\nThis action is irreversible!\n\n");
|
gfx_printf("\n\nAre you sure you want to format your sd?\nThis will delete everything on your SD card!\nThis action is irreversible!\n\n");
|
||||||
WaitFor(1500);
|
WaitFor(1500);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue