fix double darken (#1866)

This commit is contained in:
theHallwayThatBringMePassion 2024-02-09 01:39:57 +08:00 committed by GitHub
parent fd03bb800c
commit 9e8d279298
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
/*
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
* Copyleft (ɔ) 2024 zxkmm under GPL license
* Copyright (C) 2024 u-foka
*
* This file is part of PortaPack.
*
@ -184,11 +185,7 @@ class IO {
void lcd_write_pixels(const ui::Color* const pixels, size_t n) {
for (size_t i = 0; i < n; i++) {
ui::Color pixel = pixels[i];
if (get_dark_cover()) {
darken_color(pixel, get_brightness()); // Darken the pixel color
}
lcd_write_pixel(pixel);
lcd_write_pixel(pixels[i]);
}
}