summaryrefslogtreecommitdiffstats
path: root/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}