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) {
|
if (previewCharacterFound) {
|
||||||
Gui::showCharSprite(zoomIn, charFadeAlpha);
|
Gui::showCharSprite(zoomIn, charFadeAlpha);
|
||||||
} else {
|
} 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;
|
charFadeAlpha += 20;
|
||||||
if (charFadeAlpha > 255) charFadeAlpha = 255;
|
if (charFadeAlpha > 255) charFadeAlpha = 255;
|
||||||
@ -617,7 +617,7 @@ void changeCharacter(void) {
|
|||||||
bool exportFound = false;
|
bool exportFound = false;
|
||||||
switch (highlightedGame) {
|
switch (highlightedGame) {
|
||||||
case 3:
|
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) {
|
if (access(chrFilePath, F_OK) == 0) {
|
||||||
sndSelect();
|
sndSelect();
|
||||||
readSS4CharacterFile(characterList_cursorPosition, chrFilePath);
|
readSS4CharacterFile(characterList_cursorPosition, chrFilePath);
|
||||||
@ -626,7 +626,7 @@ void changeCharacter(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
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) {
|
if (access(chrFilePath, F_OK) == 0) {
|
||||||
sndSelect();
|
sndSelect();
|
||||||
readSS3CharacterFile(characterList_cursorPosition, chrFilePath);
|
readSS3CharacterFile(characterList_cursorPosition, chrFilePath);
|
||||||
@ -635,7 +635,7 @@ void changeCharacter(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
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) {
|
if (access(chrFilePath, F_OK) == 0) {
|
||||||
sndSelect();
|
sndSelect();
|
||||||
readSS2CharacterFile(chrFilePath);
|
readSS2CharacterFile(chrFilePath);
|
||||||
|
@ -403,7 +403,7 @@ void changeEmblem(void) {
|
|||||||
if (importPage == 1 && totalEmblems > 0) {
|
if (importPage == 1 && totalEmblems > 0) {
|
||||||
switch (highlightedGame) {
|
switch (highlightedGame) {
|
||||||
case 3:
|
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) {
|
if (access(embFilePath, F_OK) == 0) {
|
||||||
sndSelect();
|
sndSelect();
|
||||||
readSS4EmblemFile(cursorPosition, embFilePath);
|
readSS4EmblemFile(cursorPosition, embFilePath);
|
||||||
@ -412,7 +412,7 @@ void changeEmblem(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
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) {
|
if (access(embFilePath, F_OK) == 0) {
|
||||||
sndSelect();
|
sndSelect();
|
||||||
readSS3EmblemFile(embFilePath);
|
readSS3EmblemFile(embFilePath);
|
||||||
|
@ -95,6 +95,14 @@ void getDirectoryContents (vector<DirEntry>& dirContents, const vector<string> e
|
|||||||
dirEntry.isDirectory = (st.st_mode & S_IFDIR) ? true : false;
|
dirEntry.isDirectory = (st.st_mode & S_IFDIR) ? true : false;
|
||||||
|
|
||||||
if (dirEntry.name.compare(".") != 0 && ((dirEntry.isDirectory && showDir) || nameEndsWith(dirEntry.name, extensionList))) {
|
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);
|
dirContents.push_back (dirEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,13 +142,13 @@ void getExportedCharacterContents (void) {
|
|||||||
|
|
||||||
switch (highlightedGame) {
|
switch (highlightedGame) {
|
||||||
case 3:
|
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;
|
break;
|
||||||
case 2:
|
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;
|
break;
|
||||||
case 1:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user