summaryrefslogtreecommitdiffstats
path: root/gui/console.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-02-07 23:58:09 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-12 18:30:41 +0100
commitede51c528e5cebc7f1930d5c9da541e7d11c0138 (patch)
tree6ea3d7b2a5881cc0489f0b72ffeacd6d4adf7348 /gui/console.cpp
parentAllow recovery to be restored if backup=1 flag is present in recovery.fstab (diff)
downloadandroid_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.gz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.bz2
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.lz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.xz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.zst
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.zip
Diffstat (limited to '')
-rw-r--r--gui/console.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index 517a7c293..5d0ed3ec3 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -103,7 +103,7 @@ extern "C" void gui_print_overwrite(const char *fmt, ...)
return;
}
-GUIConsole::GUIConsole(xml_node<>* node)
+GUIConsole::GUIConsole(xml_node<>* node) : GUIObject(node)
{
xml_attribute<>* attr;
xml_node<>* child;
@@ -242,6 +242,9 @@ int GUIConsole::RenderConsole(void)
int GUIConsole::Render(void)
{
+ if(!isConditionTrue())
+ return 0;
+
if (mSlideout && mSlideoutState == hidden)
return RenderSlideout();
@@ -250,6 +253,9 @@ int GUIConsole::Render(void)
int GUIConsole::Update(void)
{
+ if(!isConditionTrue())
+ return 0;
+
if (mSlideout && mSlideoutState != visible)
{
if (mSlideoutState == hidden)
@@ -326,6 +332,9 @@ int GUIConsole::IsInRegion(int x, int y)
// Return 0 on success, >0 to ignore remainder of touch, and <0 on error
int GUIConsole::NotifyTouch(TOUCH_STATE state, int x, int y)
{
+ if(!isConditionTrue())
+ return -1;
+
if (mSlideout && mSlideoutState == hidden)
{
if (state == TOUCH_START)