gui: simplify blanktimer

- get rid of separate thread, check timer in rendering thread instead
- use an enum for the blanking state instead of magic integers
- move #ifdefs for TW_NO_SCREEN_TIMEOUT inside blanktimer class
- move some #includes and enum TOUCH_STATE to pages.hpp

Change-Id: Id4b104e3680dc5db41d8ba85e32d722cf4086299
This commit is contained in:
that
2015-01-11 12:16:53 +01:00
parent f66324ffbb
commit fb759d45f5
8 changed files with 77 additions and 146 deletions
-8
View File
@@ -42,9 +42,7 @@
#include "../adb_install.h"
#include "../fuse_sideload.h"
#ifndef TW_NO_SCREEN_TIMEOUT
#include "blanktimer.hpp"
#endif
extern "C" {
#include "../twcommon.h"
#include "../minuitwrp/minui.h"
@@ -59,10 +57,6 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
#ifndef TW_NO_SCREEN_TIMEOUT
extern blanktimer blankTimer;
#endif
void curtainClose(void);
GUIAction::mapFunc GUIAction::mf;
@@ -446,9 +440,7 @@ void GUIAction::operation_end(const int operation_status)
}
DataManager::SetValue("tw_operation_state", 1);
DataManager::SetValue(TW_ACTION_BUSY, 0);
#ifndef TW_NO_SCREEN_TIMEOUT
blankTimer.resetTimerAndUnblank();
#endif
time(&Stop);
if ((int) difftime(Stop, Start) > 10)
DataManager::Vibrate("tw_action_vibrate");