mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-04-16 16:51:33 +00:00
fix double darken (#1866)
This commit is contained in:
parent
fd03bb800c
commit
9e8d279298
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
|
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
|
||||||
* Copyleft (ɔ) 2024 zxkmm under GPL license
|
* Copyleft (ɔ) 2024 zxkmm under GPL license
|
||||||
|
* Copyright (C) 2024 u-foka
|
||||||
*
|
*
|
||||||
* This file is part of PortaPack.
|
* This file is part of PortaPack.
|
||||||
*
|
*
|
||||||
@ -184,11 +185,7 @@ class IO {
|
|||||||
|
|
||||||
void lcd_write_pixels(const ui::Color* const pixels, size_t n) {
|
void lcd_write_pixels(const ui::Color* const pixels, size_t n) {
|
||||||
for (size_t i = 0; i < n; i++) {
|
for (size_t i = 0; i < n; i++) {
|
||||||
ui::Color pixel = pixels[i];
|
lcd_write_pixel(pixels[i]);
|
||||||
if (get_dark_cover()) {
|
|
||||||
darken_color(pixel, get_brightness()); // Darken the pixel color
|
|
||||||
}
|
|
||||||
lcd_write_pixel(pixel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user