Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Oct 20, 2018
1 parent 7be67d4 commit cf745d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions arm9/source/fileOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ u32 copyBuf[copyBufSize];

char clipboard[256];
char clipboardFilename[256];
bool clipboardFolder = false;
bool clipboardOn = false;
bool clipboardUsed = false;
bool clipboardDrive = false; // false == SD card, true == Flashcard
Expand Down Expand Up @@ -103,7 +104,7 @@ int fcopy(const char *sourcePath, const char *destinationPath)
}
printf ("\x1b[16;0H");
printf ("Progress:\n");
printf ("%i/%i Bytes", (int)offset, (int)fsize);
printf ("%i/%i Bytes ", (int)offset, (int)fsize);

// Copy file to destination path
numr = fread(copyBuf, 2, copyBufSize, sourceFile);
Expand All @@ -115,7 +116,7 @@ int fcopy(const char *sourcePath, const char *destinationPath)
fclose(destinationFile);

printf ("\x1b[17;0H");
printf ("%i/%i Bytes", (int)fsize, (int)fsize);
printf ("%i/%i Bytes ", (int)fsize, (int)fsize);
for (int i = 0; i < 30; i++) swiWaitForVBlank();

return 1;
Expand Down
1 change: 1 addition & 0 deletions arm9/source/fileOperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

extern char clipboard[256];
extern char clipboardFilename[256];
extern bool clipboardFolder;
extern bool clipboardOn;
extern bool clipboardUsed;
extern bool clipboardDrive; // false == SD card, true == Flashcard
Expand Down
4 changes: 3 additions & 1 deletion arm9/source/file_browse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ bool fileBrowse_paste(char path[PATH_MAX]) {
printf ("_____"); // Clear time
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
printf ("\x1B[47m"); // Print foreground white color
printf("Paste file here?\n\n");
printf(clipboardFolder ? "Paste folder here?" : "Paste file here?");
printf("\n\n");
iprintf ("\x1b[%d;0H", OPTIONS_ENTRIES_START_ROW);
maxCursors++;
printf(" Copy path\n");
Expand Down Expand Up @@ -593,6 +594,7 @@ string browseForFile (void) {
} else if (strcmp(entry->name.c_str(), "..") != 0) {
snprintf(clipboard, sizeof(clipboard), "%s%s", path, entry->name.c_str());
snprintf(clipboardFilename, sizeof(clipboardFilename), "%s", entry->name.c_str());
clipboardFolder = entry->isDirectory;
clipboardOn = true;
clipboardDrive = secondaryDrive;
clipboardInNitro = (strncmp (path, "nitro:/", 7) == 0);
Expand Down

0 comments on commit cf745d9

Please sign in to comment.