diff options
Diffstat (limited to '')
-rw-r--r-- | gui/blanktimer.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp index 7085557e8..17cc0b3d1 100644 --- a/gui/blanktimer.cpp +++ b/gui/blanktimer.cpp @@ -109,7 +109,17 @@ int blanktimer::getBrightness(void) { string brightness_path = EXPAND(TW_BRIGHTNESS_PATH); if ((TWFunc::read_file(brightness_path, results)) != 0) return -1; - return atoi(results.c_str()); + int result = atoi(results.c_str()); + if (result == 0) { + int tw_brightness; + DataManager::GetValue("tw_brightness", tw_brightness); + if (tw_brightness) { + result = tw_brightness; + } else { + result = 255; + } + } + return result; } |