sim: change brightness only when screen is on (#66)

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/45
This commit is contained in:
NeroBurner 2022-09-18 21:46:49 +02:00 committed by GitHub
parent 3d52e4a826
commit 8460a5207a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,9 +668,9 @@ public:
} else if (key == 'C') { } else if (key == 'C') {
batteryController.isCharging = false; batteryController.isCharging = false;
batteryController.isPowerPresent = false; batteryController.isPowerPresent = false;
} else if (key == 'l') { } else if (key == 'l' && !screen_off_created) {
brightnessController.Higher(); brightnessController.Higher();
} else if (key == 'L') { } else if (key == 'L' && !screen_off_created) {
brightnessController.Lower(); brightnessController.Lower();
} else if (key == 'p') { } else if (key == 'p') {
this->print_memory_usage = true; this->print_memory_usage = true;