mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-28 10:41:52 +01:00
qt: Hide system titles with invisible or invalid SMDH data. (#6381)
This commit is contained in:
parent
387cf15719
commit
a74d7a0e6b
@ -81,7 +81,16 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign
|
||||
loader->ReadIcon(smdh);
|
||||
}
|
||||
|
||||
if (!Loader::IsValidSMDH(smdh) && UISettings::values.game_list_hide_no_icon) {
|
||||
const auto system_title = ((program_id >> 32) & 0xFFFFFFFF) == 0x00040010;
|
||||
if (Loader::IsValidSMDH(smdh)) {
|
||||
if (system_title) {
|
||||
auto smdh_struct = reinterpret_cast<Loader::SMDH*>(smdh.data());
|
||||
if (!(smdh_struct->flags & Loader::SMDH::Flags::Visible)) {
|
||||
// Skip system titles without the visible flag.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (UISettings::values.game_list_hide_no_icon || system_title) {
|
||||
// Skip this invalid entry
|
||||
return true;
|
||||
}
|
||||
|
@ -72,6 +72,10 @@ struct SMDH {
|
||||
Taiwan = 6,
|
||||
};
|
||||
|
||||
enum Flags {
|
||||
Visible = 1 << 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets game icon from SMDH
|
||||
* @param large If true, returns large icon (48x48), otherwise returns small icon (24x24)
|
||||
|
Loading…
Reference in New Issue
Block a user