aboutsummaryrefslogtreecommitdiffstats
path: root/ui.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2010-06-26 12:25:02 -0700
committerKoushik Dutta <koushd@gmail.com>2010-06-26 12:25:02 -0700
commit0837091e8de5a08383499b5fa2e85aaee22f1fff (patch)
tree2449bb9a8ab626cb0c1a033b81ba42ec25339258 /ui.c
parentd634bb2d2b12add1021053221c39d3847b5aedb5 (diff)
downloadbootable_recovery-0837091e8de5a08383499b5fa2e85aaee22f1fff.zip
bootable_recovery-0837091e8de5a08383499b5fa2e85aaee22f1fff.tar.gz
bootable_recovery-0837091e8de5a08383499b5fa2e85aaee22f1fff.tar.bz2
command line nandroid
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index 651eea1..2e0ff83 100644
--- a/ui.c
+++ b/ui.c
@@ -48,6 +48,7 @@ static gr_surface gBackgroundIcon[NUM_BACKGROUND_ICONS];
static gr_surface gProgressBarIndeterminate[PROGRESSBAR_INDETERMINATE_STATES];
static gr_surface gProgressBarEmpty[NUM_SIDES];
static gr_surface gProgressBarFill[NUM_SIDES];
+static int ui_has_initialized = 0;
static const struct { gr_surface* surface; const char *name; } BITMAPS[] = {
{ &gBackgroundIcon[BACKGROUND_ICON_INSTALLING], "icon_installing" },
@@ -176,6 +177,7 @@ static void draw_text_line(int row, const char* t) {
// Should only be called with gUpdateMutex locked.
static void draw_screen_locked(void)
{
+ if (!ui_has_initialized) return;
draw_background_locked(gCurrentIcon);
draw_progress_locked();
@@ -229,6 +231,7 @@ static void draw_screen_locked(void)
// Should only be called with gUpdateMutex locked.
static void update_screen_locked(void)
{
+ if (!ui_has_initialized) return;
draw_screen_locked();
gr_flip();
}
@@ -237,6 +240,7 @@ static void update_screen_locked(void)
// Should only be called with gUpdateMutex locked.
static void update_progress_locked(void)
{
+ if (!ui_has_initialized) return;
if (show_text || !gPagesIdentical) {
draw_screen_locked(); // Must redraw the whole screen
gPagesIdentical = 1;
@@ -346,6 +350,7 @@ static void *input_thread(void *cookie)
void ui_init(void)
{
+ ui_has_initialized = 1;
gr_init();
ev_init();