Merge pull request #6192 from gamblor21/is31fl3741_fix

Fix no scaled framebuffer display
This commit is contained in:
Scott Shawcroft 2022-03-24 14:53:12 -07:00 committed by GitHub
commit 39d856fb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -184,16 +184,16 @@ void common_hal_is31fl3741_FrameBuffer_refresh(is31fl3741_FrameBuffer_obj_t *sel
}
if ((dirty_row_flags >> (y % 8)) & 0x1) {
for (int x = 0; x < self->width; x++) {
uint32_t color = 0;
if (self->auto_gamma) {
color = IS31GammaTable[((*buffer) >> 16 & 0xFF)] +
IS31GammaTable[((*buffer) >> 8 & 0xFF)] +
color = (IS31GammaTable[((*buffer) >> 16 & 0xFF)] << 16) +
(IS31GammaTable[((*buffer) >> 8 & 0xFF)] << 8) +
IS31GammaTable[((*buffer) & 0xFF)];
} else {
color = *buffer;
}
for (int x = 0; x < self->width; x++) {
common_hal_is31fl3741_draw_pixel(self->is31fl3741, x, y, color, self->mapping);
buffer++;
}