1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Remove display_back_light bug from "DisplayBacklightEnforceOn"

This commit is contained in:
Dmitry422
2025-10-30 16:48:23 +07:00
parent a553bc2f57
commit 5db6a03811

View File

@@ -488,9 +488,10 @@ static void notification_process_notification_message(
break;
case NotificationMessageTypeLedDisplayBacklightEnforceOn:
furi_check(app->display_led_lock < UINT8_MAX);
app->display_led_lock++;
// --- NIGHT SHIFT ---
if(app->display_led_lock == 1) {
if(app->display_led_lock <1 ) {
app->display_led_lock = 1;
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting *
@@ -499,13 +500,11 @@ static void notification_process_notification_message(
break;
case NotificationMessageTypeLedDisplayBacklightEnforceAuto:
if(app->display_led_lock > 0) {
app->display_led_lock--;
if(app->display_led_lock == 0) {
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting *
app->current_night_shift * 1.0f);
}
app->display_led_lock = 0;
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting *
app->current_night_shift * 1.0f);
// --- NIGHT SHIFT END ---
} else {
FURI_LOG_E(TAG, "Incorrect BacklightEnforce use");