mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-05-05 15:56:37 +08:00
Only display CIA info if successfully obtained.
This commit is contained in:
parent
558ace6bc5
commit
854766b04d
@ -287,27 +287,27 @@ void uiGetDirContents(std::vector<SelectableElement> &elements, const std::strin
|
|||||||
std::string extension = fs::extension(path);
|
std::string extension = fs::extension(path);
|
||||||
if(extension.compare("cia") == 0) {
|
if(extension.compare("cia") == 0) {
|
||||||
app::App app;
|
app::App app;
|
||||||
app::ciaInfo(&app, path, fs::SD);
|
if(app::ciaInfo(&app, path, fs::SD) == app::APP_SUCCESS) {
|
||||||
|
std::stringstream titleId;
|
||||||
|
titleId << "0x" << std::setfill('0') << std::setw(16) << std::hex << app.titleId;
|
||||||
|
|
||||||
std::stringstream titleId;
|
std::stringstream uniqueId;
|
||||||
titleId << "0x" << std::setfill('0') << std::setw(16) << std::hex << app.titleId;
|
uniqueId << "0x" << std::setfill('0') << std::setw(8) << std::hex << app.uniqueId;
|
||||||
|
|
||||||
std::stringstream uniqueId;
|
std::stringstream version;
|
||||||
uniqueId << "0x" << std::setfill('0') << std::setw(8) << std::hex << app.uniqueId;
|
version << "0x" << std::setfill('0') << std::hex << app.version;
|
||||||
|
|
||||||
std::stringstream version;
|
std::stringstream size;
|
||||||
version << "0x" << std::setfill('0') << std::hex << app.version;
|
size << "" << app.size << " bytes (" << std::fixed << std::setprecision(2) << app.size / 1024.0f / 1024.0f << "MB)";
|
||||||
|
|
||||||
std::stringstream size;
|
info.push_back("Installed Size: " + size.str());
|
||||||
size << "" << app.size << " bytes (" << std::fixed << std::setprecision(2) << app.size / 1024.0f / 1024.0f << "MB)";
|
info.push_back("Title ID: " + titleId.str());
|
||||||
|
info.push_back("Unique ID: " + uniqueId.str());
|
||||||
info.push_back("Installed Size: " + size.str());
|
info.push_back("Product Code: " + std::string(app.productCode));
|
||||||
info.push_back("Title ID: " + titleId.str());
|
info.push_back("Platform: " + app::platformString(app.platform));
|
||||||
info.push_back("Unique ID: " + uniqueId.str());
|
info.push_back("Category: " + app::categoryString(app.category));
|
||||||
info.push_back("Product Code: " + std::string(app.productCode));
|
info.push_back("Version: " + version.str());
|
||||||
info.push_back("Platform: " + app::platformString(app.platform));
|
}
|
||||||
info.push_back("Category: " + app::categoryString(app.category));
|
|
||||||
info.push_back("Version: " + version.str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.push_back({path, name, info});
|
elements.push_back({path, name, info});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user