gui: use XML-based page for splash screen instead of a static jpg
For devices with an unusual aspect ratio, stretching a bitmap to
the screen resolution is sub-optimal. So let's reuse our XML engine
that allows assembling the splash screen from individual parts.
The splash page is loaded from a separate XML file for quick loading.
Change-Id: I2d3dad26e42fcefaf563dacdf0ffa61f209dada1
diff --git a/gui/pages.cpp b/gui/pages.cpp
index def2629..c455662 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -64,7 +64,6 @@
std::map<std::string, PageSet*> PageManager::mPageSets;
PageSet* PageManager::mCurrentSet;
-PageSet* PageManager::mBaseSet = NULL;
MouseCursor *PageManager::mMouseCursor = NULL;
HardwareKeyboard *PageManager::mHardwareKeyboard = NULL;
bool PageManager::mReloadTheme = false;
@@ -1421,10 +1420,6 @@
LOGERR("Package %s failed to load.\n", name.c_str());
}
- // The first successful package we loaded is the base
- if (mBaseSet == NULL)
- mBaseSet = mCurrentSet;
-
mCurrentSet = pageSet;
if (pZip) {
@@ -1500,8 +1495,6 @@
}
if (mCurrentSet == set)
SelectPackage(name);
- if (mBaseSet == set)
- mBaseSet = mCurrentSet;
delete set;
GUIConsole::Translate_Now();
return 0;
@@ -1518,6 +1511,8 @@
PageSet* set = (*iter).second;
mPageSets.erase(iter);
delete set;
+ if (set == mCurrentSet)
+ mCurrentSet = NULL;
return;
}