mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Show progress of file copying
This commit is contained in:
parent
3b06f2fc93
commit
f7c4e77d84
@ -60,6 +60,9 @@ int fcopy(const char *sourcePath, const char *destinationPath)
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
printf ("\x1b[16;0H");
|
||||
printf ("Progress:\n");
|
||||
printf ("%i/%i Bytes", (int)offset, (int)fsize);
|
||||
|
||||
// Copy file to destination path
|
||||
numr = fread(copyBuf, 2, copyBufSize, sourceFile);
|
||||
@ -69,6 +72,11 @@ int fcopy(const char *sourcePath, const char *destinationPath)
|
||||
if (offset > fsize) {
|
||||
fclose(sourceFile);
|
||||
fclose(destinationFile);
|
||||
|
||||
printf ("\x1b[17;0H");
|
||||
printf ("%i/%i Bytes", (int)fsize, (int)fsize);
|
||||
for (int i = 0; i < 60; i++) swiWaitForVBlank();
|
||||
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user