Brightness warmth: set warmth before cinematic brightness

Allows a more fluid animation.
This commit is contained in:
Nicolas Mailloux 2021-08-18 19:46:32 -04:00
parent df5791ce44
commit d9a46e7615

View file

@ -812,17 +812,6 @@ void MainWindow::setBatteryIcon() {
}
void MainWindow::setInitialBrightness() {
int brightness_value = brightness_checkconfig(".config/03-brightness/config");
if(checkconfig("/tmp/oobe-inkbox_completed") == true or checkconfig("/tmp/inkbox-cinematicBrightness_ran") == true) {
// Coming from OOBE setup; not doing that fancy stuff again ;p
QFile::remove("/tmp/oobe-inkbox_completed");
pre_set_brightness(brightness_value);
}
else {
// Fancy brightness fade-in
string_writeconfig("/tmp/inkbox-cinematicBrightness_ran", "true");
cinematicBrightness(brightness_value, 0);
}
string_checkconfig_ro("/opt/inkbox_device");
if(checkconfig_str_val == "n873\n") {
int warmth;
@ -835,6 +824,17 @@ void MainWindow::setInitialBrightness() {
}
set_warmth(warmth);
}
int brightness_value = brightness_checkconfig(".config/03-brightness/config");
if(checkconfig("/tmp/oobe-inkbox_completed") == true or checkconfig("/tmp/inkbox-cinematicBrightness_ran") == true) {
// Coming from OOBE setup; not doing that fancy stuff again ;p
QFile::remove("/tmp/oobe-inkbox_completed");
pre_set_brightness(brightness_value);
}
else {
// Fancy brightness fade-in
string_writeconfig("/tmp/inkbox-cinematicBrightness_ran", "true");
cinematicBrightness(brightness_value, 0);
}
}
void MainWindow::refreshScreen() {