Add support for WUHB file format (#1190)

This commit is contained in:
goeiecool9999 2024-05-05 02:35:01 +02:00 committed by GitHub
parent f28043e0e9
commit dc480ac00b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 617 additions and 3 deletions

View file

@ -643,16 +643,18 @@ void MainWindow::OnFileMenu(wxCommandEvent& event)
if (menuId == MAINFRAME_MENU_ID_FILE_LOAD)
{
const auto wildcard = formatWxString(
"{}|*.wud;*.wux;*.wua;*.iso;*.rpx;*.elf;title.tmd"
"{}|*.wud;*.wux;*.wua;*.wuhb;*.iso;*.rpx;*.elf;title.tmd"
"|{}|*.wud;*.wux;*.iso"
"|{}|title.tmd"
"|{}|*.wua"
"|{}|*.wuhb"
"|{}|*.rpx;*.elf"
"|{}|*",
_("All Wii U files (*.wud, *.wux, *.wua, *.iso, *.rpx, *.elf)"),
_("All Wii U files (*.wud, *.wux, *.wua, *.wuhb, *.iso, *.rpx, *.elf)"),
_("Wii U image (*.wud, *.wux, *.iso, *.wad)"),
_("Wii U NUS content"),
_("Wii U archive (*.wua)"),
_("Wii U homebrew bundle (*.wuhb)"),
_("Wii U executable (*.rpx, *.elf)"),
_("All files (*.*)")
);

View file

@ -1230,6 +1230,16 @@ void wxGameList::AsyncWorkerThread()
if(!titleInfo.Mount(tempMountPath, "", FSC_PRIORITY_BASE))
continue;
auto tgaData = fsc_extractFile((tempMountPath + "/meta/iconTex.tga").c_str());
// try iconTex.tga.gz
if (!tgaData)
{
tgaData = fsc_extractFile((tempMountPath + "/meta/iconTex.tga.gz").c_str());
if (tgaData)
{
auto decompressed = zlibDecompress(*tgaData, 70*1024);
std::swap(tgaData, decompressed);
}
}
bool iconSuccessfullyLoaded = false;
if (tgaData && tgaData->size() > 16)
{

View file

@ -948,6 +948,8 @@ wxString wxTitleManagerList::GetTitleEntryText(const TitleEntry& entry, ItemColu
return _("NUS");
case wxTitleManagerList::EntryFormat::WUA:
return _("WUA");
case wxTitleManagerList::EntryFormat::WUHB:
return _("WUHB");
}
return "";
}
@ -1022,6 +1024,9 @@ void wxTitleManagerList::HandleTitleListCallback(CafeTitleListCallbackEvent* evt
case TitleInfo::TitleDataFormat::WIIU_ARCHIVE:
entryFormat = EntryFormat::WUA;
break;
case TitleInfo::TitleDataFormat::WUHB:
entryFormat = EntryFormat::WUHB;
break;
case TitleInfo::TitleDataFormat::HOST_FS:
default:
entryFormat = EntryFormat::Folder;

View file

@ -44,6 +44,7 @@ public:
WUD,
NUS,
WUA,
WUHB,
};
// sort by column, if -1 will sort by last column or default (=titleid)