mirror of
https://github.com/RocketRobz/SavvyManager.git
synced 2025-06-18 17:15:34 -04:00
Hide filetype for exported files
This commit is contained in:
parent
3447d44508
commit
b2cb4de4bd
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -95,6 +95,14 @@ void getDirectoryContents (vector<DirEntry>& dirContents, const vector<string> 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user