From 8460a5207a9060e9ecd189f804b7d99cfaa64034 Mon Sep 17 00:00:00 2001 From: NeroBurner Date: Sun, 18 Sep 2022 21:46:49 +0200 Subject: [PATCH] sim: change brightness only when screen is on (#66) Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/45 --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 77fe539..9828247 100644 --- a/main.cpp +++ b/main.cpp @@ -668,9 +668,9 @@ class Framework { } else if (key == 'C') { batteryController.isCharging = false; batteryController.isPowerPresent = false; - } else if (key == 'l') { + } else if (key == 'l' && !screen_off_created) { brightnessController.Higher(); - } else if (key == 'L') { + } else if (key == 'L' && !screen_off_created) { brightnessController.Lower(); } else if (key == 'p') { this->print_memory_usage = true;