summaryrefslogtreecommitdiffstats
path: root/gui/gui.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2015-01-20 20:21:04 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-01-22 22:21:27 +0100
commit3454ade92db48236057814f0ade5fa45bd57cd62 (patch)
tree8cf3de0c390157420ad0fe9a33b17237132ba7cb /gui/gui.cpp
parentHide some non critical error messages (diff)
downloadandroid_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.gz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.bz2
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.lz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.xz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.zst
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.zip
Diffstat (limited to 'gui/gui.cpp')
-rw-r--r--gui/gui.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/gui/gui.cpp b/gui/gui.cpp
index 9b918f0e7..fecc03278 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -715,11 +715,12 @@ std::string gui_parse_text(string inText)
extern "C" int gui_init(void)
{
gr_init();
+ std::string curtain_path = TWRES "images/curtain.jpg";
- if (res_create_surface("/res/images/curtain.jpg", &gCurtain))
+ if (res_create_surface(curtain_path.c_str(), &gCurtain))
{
printf
- ("Unable to locate '/res/images/curtain.jpg'\nDid you set a DEVICE_RESOLUTION in your config files?\n");
+ ("Unable to locate '%s'\nDid you set a DEVICE_RESOLUTION in your config files?\n", curtain_path.c_str());
return -1;
}
@@ -734,9 +735,10 @@ extern "C" int gui_loadResources(void)
#ifndef TW_OEM_BUILD
int check = 0;
DataManager::GetValue(TW_IS_ENCRYPTED, check);
+
if (check)
{
- if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "decrypt"))
+ if (PageManager::LoadPackage("TWRP", TWRES "ui.xml", "decrypt"))
{
LOGERR("Failed to load base packages.\n");
goto error;
@@ -771,7 +773,7 @@ extern "C" int gui_loadResources(void)
if (check || PageManager::LoadPackage("TWRP", theme_path, "main"))
{
#endif // ifndef TW_OEM_BUILD
- if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "main"))
+ if (PageManager::LoadPackage("TWRP", TWRES "ui.xml", "main"))
{
LOGERR("Failed to load base packages.\n");
goto error;
@@ -807,7 +809,7 @@ extern "C" int gui_loadCustomResources(void)
// There is a custom theme, try to load it
if (PageManager::ReloadPackage("TWRP", theme_path)) {
// Custom theme failed to load, try to load stock theme
- if (PageManager::ReloadPackage("TWRP", "/res/ui.xml")) {
+ if (PageManager::ReloadPackage("TWRP", TWRES "ui.xml")) {
LOGERR("Failed to load base packages.\n");
goto error;
}