diff --git a/mainwindow.cpp b/mainwindow.cpp index 0ebfb9a..a1215fd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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() {