diff options
Diffstat (limited to 'gui/blanktimer.cpp')
-rw-r--r-- | gui/blanktimer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp index 700a9ad27..0b1f0083c 100644 --- a/gui/blanktimer.cpp +++ b/gui/blanktimer.cpp @@ -48,6 +48,11 @@ blanktimer::blanktimer(void) { setTime(0); setConBlank(0); orig_brightness = getBrightness(); + screenoff = false; +} + +bool blanktimer::IsScreenOff() { + return screenoff; } void blanktimer::setTime(int newtime) { @@ -92,6 +97,7 @@ int blanktimer::setClockTimer(void) { if (sleepTimer && diff.tv_sec > sleepTimer && conblank < 2) { setConBlank(2); setBrightness(0); + screenoff = true; PageManager::ChangeOverlay("lock"); } #ifndef TW_NO_SCREEN_BLANK @@ -146,6 +152,7 @@ void blanktimer::resetTimerAndUnblank(void) { // No break here, we want to keep going case 2: gui_forceRender(); + screenoff = false; // No break here, we want to keep going case 1: setBrightness(orig_brightness); |