From 0d9133d654805be31a7e21f4ccb74e9e0a44fd55 Mon Sep 17 00:00:00 2001 From: gordon1337 Date: Sat, 8 Jun 2013 14:17:07 +0200 Subject: Do not render the GUI when the blanktimer turns off the display. Normally, when the display has been turned off by blanktimer, the GUI actually still renders the GUI elements (eg. progressbar while doing backup/restore/etc.) This patch will check whenever the display is turned off, and if it is turned off simply dont render. This avoids heating up the device and will save battery. --- gui/blanktimer.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui/blanktimer.hpp') diff --git a/gui/blanktimer.hpp b/gui/blanktimer.hpp index 2d83c4dae..60d5b1b42 100644 --- a/gui/blanktimer.hpp +++ b/gui/blanktimer.hpp @@ -30,6 +30,7 @@ class blanktimer { int setTimerThread(void); void resetTimerAndUnblank(void); void setTime(int newtime); + bool IsScreenOff(); private: void setConBlank(int blank); @@ -47,6 +48,7 @@ class blanktimer { timespec btimer; unsigned long long sleepTimer; int orig_brightness; + bool screenoff; }; extern blanktimer blankTimer; -- cgit v1.2.3