summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--data.cpp3
-rw-r--r--minui/graphics.c7
-rw-r--r--minui/minui.h7
-rw-r--r--openrecoveryscript.cpp2
4 files changed, 15 insertions, 4 deletions
diff --git a/data.cpp b/data.cpp
index be76592aa..c766f0061 100644
--- a/data.cpp
+++ b/data.cpp
@@ -556,8 +556,7 @@ void DataManager::SetBackupFolder()
if (zip_path.size() < storage_path.size()) {
SetValue(TW_ZIP_LOCATION_VAR, storage_path);
} else {
- zip_root= zip_path;
- zip_root.resize(storage_path.size());
+ zip_root = TWFunc::Get_Root_Path(zip_path);
if (zip_root != storage_path) {
LOGINFO("DataManager::SetBackupFolder zip path was %s changing to %s, %s\n", zip_path.c_str(), storage_path.c_str(), zip_root.c_str());
SetValue(TW_ZIP_LOCATION_VAR, storage_path);
diff --git a/minui/graphics.c b/minui/graphics.c
index 4968eac7a..9ee77b3aa 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -223,7 +223,12 @@ void gr_font_size(int *x, int *y)
*y = gr_font->cheight;
}
-int gr_text(int x, int y, const char *s, int bold)
+int gr_text(int x, int y, const char *s, ...)
+{
+ return gr_text_impl(x, y, s, 0);
+}
+
+int gr_text_impl(int x, int y, const char *s, int bold)
{
GGLContext *gl = gr_context;
GRFont *font = gr_font;
diff --git a/minui/minui.h b/minui/minui.h
index 1b8dd059b..ccd501f85 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -37,7 +37,12 @@ void gr_fb_blank(bool blank);
void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
void gr_fill(int x1, int y1, int x2, int y2);
-int gr_text(int x, int y, const char *s, int bold);
+
+// system/core/charger uses different gr_print signatures in diferent
+// Android versions, either with or without int bold.
+int gr_text(int x, int y, const char *s, ...);
+int gr_text_impl(int x, int y, const char *s, int bold);
+
void gr_texticon(int x, int y, gr_surface icon);
int gr_measure(const char *s);
void gr_font_size(int *x, int *y);
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index bb472bf82..88b382974 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -98,6 +98,8 @@ int OpenRecoveryScript::run_script_file(void) {
LOGINFO("command is: '%s' and ", command);
val_start = script_line;
val_start += cindex + 1;
+ if ((int) *val_start == 32)
+ val_start++; //get rid of space
if ((int) *val_start == 51)
val_start++; //get rid of = at the beginning
strncpy(value, val_start, line_len - cindex - remove_nl);