mirror of
https://github.com/rvtr/TDT.git
synced 2025-10-31 13:51:07 -04:00
Leave 1 MiB margin for error
This commit is contained in:
parent
4894619bda
commit
9dabcebce5
@ -117,7 +117,8 @@ static bool _checkDsiSpace(unsigned long long size, bool systemApp)
|
||||
iprintf("Enough room on DSi?...");
|
||||
swiWaitForVBlank();
|
||||
|
||||
if ((systemApp ? getDsiRealFree() : getDsiFree()) < size)
|
||||
//ensure there's at least 1 MiB free, to leave margin for error
|
||||
if (((systemApp ? getDsiRealFree() : getDsiFree()) < size) || (((systemApp ? getDsiRealFree() : getDsiFree()) - size) < (1 << 20)))
|
||||
{
|
||||
iprintf("\x1B[31m"); //red
|
||||
iprintf("No\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user