summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-11 21:28:06 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-12 21:14:38 +0200
commit32c8eb81af916f04fd42e7294f699b10474beef6 (patch)
treed845c9e6435c0b6f6b1e6bc490315600b20e72eb /screen_ui.cpp
parentClean up extra-functions (diff)
downloadandroid_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar.gz
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar.bz2
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar.lz
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar.xz
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.tar.zst
android_bootable_recovery-32c8eb81af916f04fd42e7294f699b10474beef6.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 60a0ad496..4441f7abc 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -36,7 +36,9 @@
extern "C" {
#include "minuitwrp/minui.h"
int twgr_text(int x, int y, const char *s);
+#include "gui/gui.h"
}
+#include "data.hpp"
#define CHAR_WIDTH 10
#define CHAR_HEIGHT 18
@@ -220,7 +222,7 @@ void ScreenRecoveryUI::update_screen_locked()
// Updates only the progress bar, if possible, otherwise redraws the screen.
// Should only be called with updateMutex locked.
void ScreenRecoveryUI::update_progress_locked()
-{
+{return;
if (show_text || !pagesIdentical) {
draw_screen_locked(); // Must redraw the whole screen
pagesIdentical = true;
@@ -364,6 +366,9 @@ void ScreenRecoveryUI::SetProgressType(ProgressType type)
void ScreenRecoveryUI::ShowProgress(float portion, float seconds)
{
+ DataManager::SetValue("ui_progress_portion", (float)(portion * 100.0));
+ DataManager::SetValue("ui_progress_frames", seconds * 30);
+
pthread_mutex_lock(&updateMutex);
progressBarType = DETERMINATE;
progressScopeStart += progressScopeSize;
@@ -377,6 +382,8 @@ void ScreenRecoveryUI::ShowProgress(float portion, float seconds)
void ScreenRecoveryUI::SetProgress(float fraction)
{
+ DataManager::SetValue("ui_progress", (float) (fraction * 100.0)); return;
+
pthread_mutex_lock(&updateMutex);
if (fraction < 0.0) fraction = 0.0;
if (fraction > 1.0) fraction = 1.0;
@@ -400,6 +407,9 @@ void ScreenRecoveryUI::Print(const char *fmt, ...)
vsnprintf(buf, 256, fmt, ap);
va_end(ap);
+ gui_print("%s", buf);
+ return;
+
fputs(buf, stdout);
// This can get called before ui_init(), so be careful.