[libromdata] NintendoDS_BNR::imgpf(): Check for animated icons.

This was previously handled by NintendoDS before banner parsing was
split out into a separate RomData subclass.

Without IMGPF_ICON_ANIMATED, rpcli won't indicate if an animated icon
is present, but it can still be extracted with `-a`.

This fixes a regression from commit f2565965b2.
([libromdata] NintendoDS_BNR: Split icon/title data parsing out of NintendoDS.)

Affects: v2.4 - v2.5
This commit is contained in:
David Korth 2025-04-20 03:01:14 -04:00
parent fc85e53318
commit f5d34d97cb
2 changed files with 20 additions and 3 deletions

View File

@ -1,5 +1,11 @@
# Changes
## v2.6 (released 2025/??/??)
* Bug fixes:
* NintendoDS_BNR: Animated icons were missing the animated icon flag.
* Affects: v2.4 - v2.5
## v2.5 (released 2025/04/19)
* New parsers:

View File

@ -553,10 +553,21 @@ uint32_t NintendoDS_BNR::imgpf(ImageType imageType) const
uint32_t ret = 0;
switch (imageType) {
case IMG_INT_ICON:
// Use nearest-neighbor scaling.
ret = IMGPF_RESCALE_NEAREST;
case IMG_INT_ICON: {
// Is this an animated icon?
RP_D(const NintendoDS_BNR);
if (le16_to_cpu(d->nds_icon_title.version) < NDS_ICON_VERSION_DSi ||
(d->nds_icon_title.dsi_icon_seq[0] & cpu_to_le16(0xFF)) == 0)
{
// Not an animated icon.
ret = IMGPF_RESCALE_NEAREST;
} else {
// This is an animated icon.
ret = IMGPF_RESCALE_NEAREST | IMGPF_ICON_ANIMATED;
}
break;
}
default:
break;
}