diff --git a/source/charchange.cpp b/source/charchange.cpp index 7c57068..7277cb2 100644 --- a/source/charchange.cpp +++ b/source/charchange.cpp @@ -297,7 +297,7 @@ void changeCharacterGraphics(void) { if (previewCharacterFound) { Gui::showCharSprite(zoomIn, charFadeAlpha); } else { - Draw_Text(112, 104, 0.65, WHITE, "Preview not found."); + Draw_Text(112, 104, 0.65, WHITE, (import_highlightedGame==4 ? "Preview not found." : "Preview unavailable.")); } charFadeAlpha += 20; if (charFadeAlpha > 255) charFadeAlpha = 255; @@ -617,7 +617,7 @@ void changeCharacter(void) { bool exportFound = false; switch (highlightedGame) { case 3: - sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS4/characters/%s", getExportedCharacterName(importCharacterList_cursorPosition)); + sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS4/characters/%s.chr", getExportedCharacterName(importCharacterList_cursorPosition)); if (access(chrFilePath, F_OK) == 0) { sndSelect(); readSS4CharacterFile(characterList_cursorPosition, chrFilePath); @@ -626,7 +626,7 @@ void changeCharacter(void) { } break; case 2: - sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS3/characters/%s", getExportedCharacterName(importCharacterList_cursorPosition)); + sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS3/characters/%s.chr", getExportedCharacterName(importCharacterList_cursorPosition)); if (access(chrFilePath, F_OK) == 0) { sndSelect(); readSS3CharacterFile(characterList_cursorPosition, chrFilePath); @@ -635,7 +635,7 @@ void changeCharacter(void) { } break; case 1: - sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS2/characters/%s", getExportedCharacterName(importCharacterList_cursorPosition)); + sprintf(chrFilePath, "sdmc:/3ds/SavvyManager/SS2/characters/%s.chr", getExportedCharacterName(importCharacterList_cursorPosition)); if (access(chrFilePath, F_OK) == 0) { sndSelect(); readSS2CharacterFile(chrFilePath); diff --git a/source/emblemchange.cpp b/source/emblemchange.cpp index 24cd6f7..e0f6e18 100644 --- a/source/emblemchange.cpp +++ b/source/emblemchange.cpp @@ -403,7 +403,7 @@ void changeEmblem(void) { if (importPage == 1 && totalEmblems > 0) { switch (highlightedGame) { case 3: - sprintf(embFilePath, "sdmc:/3ds/SavvyManager/emblems/%s", getExportedEmblemName(importEmblemList_cursorPosition)); + sprintf(embFilePath, "sdmc:/3ds/SavvyManager/emblems/%s.emb", getExportedEmblemName(importEmblemList_cursorPosition)); if (access(embFilePath, F_OK) == 0) { sndSelect(); readSS4EmblemFile(cursorPosition, embFilePath); @@ -412,7 +412,7 @@ void changeEmblem(void) { } break; case 2: - sprintf(embFilePath, "sdmc:/3ds/SavvyManager/emblems/%s", getExportedEmblemName(importEmblemList_cursorPosition)); + sprintf(embFilePath, "sdmc:/3ds/SavvyManager/emblems/%s.emb", getExportedEmblemName(importEmblemList_cursorPosition)); if (access(embFilePath, F_OK) == 0) { sndSelect(); readSS3EmblemFile(embFilePath); diff --git a/source/file_browse.cpp b/source/file_browse.cpp index 9214dec..dcaf779 100644 --- a/source/file_browse.cpp +++ b/source/file_browse.cpp @@ -95,6 +95,14 @@ void getDirectoryContents (vector& dirContents, const vector e dirEntry.isDirectory = (st.st_mode & S_IFDIR) ? true : false; if (dirEntry.name.compare(".") != 0 && ((dirEntry.isDirectory && showDir) || nameEndsWith(dirEntry.name, extensionList))) { + if (!dirEntry.isDirectory) { + for (int i = dirEntry.name.size(); i > 0; i--) { + if (dirEntry.name[i] == '.') { + dirEntry.name[i] = '\0'; // Hide file extension from display + break; + } + } + } dirContents.push_back (dirEntry); } @@ -134,13 +142,13 @@ void getExportedCharacterContents (void) { switch (highlightedGame) { case 3: - sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS4/characters/%s", entry->name.c_str()); + sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS4/characters/%s.chr", entry->name.c_str()); break; case 2: - sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS3/characters/%s", entry->name.c_str()); + sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS3/characters/%s.chr", entry->name.c_str()); break; case 1: - sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS2/characters/%s", entry->name.c_str()); + sprintf(chrPath, "sdmc:/3ds/SavvyManager/SS2/characters/%s.chr", entry->name.c_str()); break; }