summaryrefslogtreecommitdiffstats
path: root/gui/checkbox.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2019-03-25 21:38:34 +0100
committerDees Troy <dees_troy@teamw.in>2019-04-04 04:26:53 +0200
commitb150276a43d479772eeb3e5b159bbd5c214b5dfb (patch)
tree0f8e73156c8925625b019a95dfc2d563ac72b6e8 /gui/checkbox.cpp
parentUse magiskboot to repack the boot partition (diff)
downloadandroid_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar.gz
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar.bz2
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar.lz
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar.xz
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.tar.zst
android_bootable_recovery-b150276a43d479772eeb3e5b159bbd5c214b5dfb.zip
Diffstat (limited to 'gui/checkbox.cpp')
-rwxr-xr-xgui/checkbox.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp
index 025a803a2..ad16f24c3 100755
--- a/gui/checkbox.cpp
+++ b/gui/checkbox.cpp
@@ -78,8 +78,13 @@ GUICheckbox::GUICheckbox(xml_node<>* node)
if (attr)
mVarName = attr->value();
attr = child->first_attribute("default");
- if (attr)
+ if (attr) {
DataManager::SetValue(mVarName, attr->value());
+ } else {
+ int val;
+ if (DataManager::GetValue(mVarName, val) != 0)
+ DataManager::SetValue(mVarName, 0); // Prevents check boxes from having to be tapped twice the first time
+ }
}
mCheckW = mCheckH = 0;