From 063d211c62a800738103afb6bfb8bb40641bfe7b Mon Sep 17 00:00:00 2001 From: Fernando Oliveira Date: Thu, 12 Jan 2023 16:12:55 -0300 Subject: [PATCH] gui: permanence of custom theme after changing TWRP folder After changing the TWRP folder the custom theme was not being found because it was set in the code to the folder "TWRP/theme..." This patch aims to fix that. Signed-off-by: Fernando Oliveira Change-Id: I41e6e1378c74c9ee579b7b23beb37e0c2cd8761a (cherry picked from commit ddaccbe7d411e707307ce0a9c95a36571be38ad7) --- gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/gui.cpp b/gui/gui.cpp index 00aab7ff..5c7d27e1 100755 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -816,7 +816,7 @@ extern "C" int gui_loadResources(void) } } - theme_path += "/TWRP/theme/ui.zip"; + theme_path += TWFunc::Check_For_TwrpFolder() + "/theme/ui.zip"; if (check || PageManager::LoadPackage("TWRP", theme_path, "main")) { #endif // ifndef TW_OEM_BUILD @@ -850,7 +850,7 @@ extern "C" int gui_loadCustomResources(void) } std::string theme_path = DataManager::GetSettingsStoragePath(); - theme_path += "/TWRP/theme/ui.zip"; + theme_path += TWFunc::Check_For_TwrpFolder() + "/theme/ui.zip"; // Check for a custom theme if (TWFunc::Path_Exists(theme_path)) { // There is a custom theme, try to load it