Skip to content

Commit

Permalink
[librptexture] PowerVR3::getFields(): Set the "Version" field to 2.0 …
Browse files Browse the repository at this point in the history
…for PVR2 files.
  • Loading branch information
GerbilSoft committed Oct 25, 2024
1 parent d07a325 commit 1e44388
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/librptexture/fileformat/PowerVR3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,21 @@ int PowerVR3::getFields(RomFields *fields) const
const int initial_count = fields->count();
fields->reserve(initial_count + 8); // Maximum of 8 fields.

// TODO: Handle PVR 1.0 and 2.0 headers.
fields->addField_string(C_("PowerVR3", "Version"), "3.0.0");
const char *s_version;
switch (d->pvrType) {
default:
s_version = nullptr;
break;
case PowerVR3Private::PVRType::PVR3:
s_version = "3.0.0";
break;
case PowerVR3Private::PVRType::PVR2:
s_version = "2.0";
break;
}
if (s_version) {
fields->addField_string(C_("PowerVR3", "Version"), s_version);
}

// Endianness
#if SYS_BYTEORDER == SYS_LIL_ENDIAN
Expand Down

0 comments on commit 1e44388

Please sign in to comment.