Skip to content

Commit

Permalink
Merge branch 'SmittyHalibut:main' into AddedIPSTUBEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinius79 committed Sep 19, 2024
2 parents e346d60 + 4b23b15 commit 221c13d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EleksTubeHAX_pio/src/TFTs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ bool TFTs::LoadImageIntoBuffer(uint8_t file_index) {
{
read32(bmpFS); read32(bmpFS); read32(bmpFS); // size, w resolution, h resolution
paletteSize = read32(bmpFS);
if (paletteSize == 0) paletteSize = bitDepth * bitDepth; // if 0, size is 2^bitDepth
if (paletteSize == 0) paletteSize = pow(2, bitDepth); // if 0, size is 2^bitDepth
bmpFS.seek(14 + headerSize); // start of color palette
for (uint16_t i = 0; i < paletteSize; i++) {
palette[i] = read32(bmpFS);
Expand Down

0 comments on commit 221c13d

Please sign in to comment.