summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/wps_parser.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-03 22:39:27 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-03 22:39:27 +0000
commit218b31272e5afcb8f98a62974b46f4febbfde39c (patch)
tree3f2f6c9b3bb0bd2298d99e13f80c4125094077c4 /apps/gui/skin_engine/wps_parser.c
parent04be8dd7fe5378e39efbf5edd9ad447d17aabc06 (diff)
downloadrockbox-218b31272e5afcb8f98a62974b46f4febbfde39c.tar.gz
rockbox-218b31272e5afcb8f98a62974b46f4febbfde39c.zip
Remove the wrapper around the wrapper (wps_data_load) and handle loading hardcoded wps in case of a broken file directly in wps.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/wps_parser.c')
-rw-r--r--apps/gui/skin_engine/wps_parser.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/apps/gui/skin_engine/wps_parser.c b/apps/gui/skin_engine/wps_parser.c
index 2c6d5ded95..1a903c98ec 100644
--- a/apps/gui/skin_engine/wps_parser.c
+++ b/apps/gui/skin_engine/wps_parser.c
@@ -1666,7 +1666,7 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
1666 1666
1667/* to setup up the wps-data from a format-buffer (isfile = false) 1667/* to setup up the wps-data from a format-buffer (isfile = false)
1668 from a (wps-)file (isfile = true)*/ 1668 from a (wps-)file (isfile = true)*/
1669static bool _skin_data_load(struct wps_data *wps_data, 1669bool skin_data_load(struct wps_data *wps_data,
1670 struct screen *display, 1670 struct screen *display,
1671 const char *buf, 1671 const char *buf,
1672 bool isfile) 1672 bool isfile)
@@ -1815,54 +1815,6 @@ static bool _skin_data_load(struct wps_data *wps_data,
1815 } 1815 }
1816} 1816}
1817 1817
1818void skin_data_load(struct wps_data *wps_data,
1819 struct screen *display,
1820 const char *buf,
1821 bool isfile)
1822{
1823 bool loaded_ok = buf && _skin_data_load(wps_data, display, buf, isfile);
1824 if (!loaded_ok) /* load the hardcoded default */
1825 {
1826 /* set the default wps for the main-screen */
1827 if(display->screen_type == SCREEN_MAIN)
1828 {
1829#if LCD_DEPTH > 1
1830 unload_wps_backdrop();
1831#endif
1832 _skin_data_load(wps_data,
1833 display,
1834#ifdef HAVE_LCD_BITMAP
1835 "%s%?it<%?in<%in. |>%it|%fn>\n"
1836 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1837 "%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>\n"
1838 "\n"
1839 "%al%pc/%pt%ar[%pp:%pe]\n"
1840 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1841 "%pb\n"
1842 "%pm\n", false);
1843#else
1844 "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
1845 "%pc%?ps<*|/>%pt\n", false);
1846#endif
1847 }
1848#ifdef HAVE_REMOTE_LCD
1849 /* set the default wps for the remote-screen */
1850 else if(display->screen_type == SCREEN_REMOTE)
1851 {
1852#if LCD_REMOTE_DEPTH > 1
1853 unload_remote_wps_backdrop();
1854#endif
1855 _skin_data_load(wps_data,
1856 display,
1857 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1858 "%s%?it<%?in<%in. |>%it|%fn>\n"
1859 "%al%pc/%pt%ar[%pp:%pe]\n"
1860 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1861 "%pb\n", false);
1862 }
1863#endif
1864 }
1865}
1866 1818
1867int wps_subline_index(struct wps_data *data, int line, int subline) 1819int wps_subline_index(struct wps_data *data, int line, int subline)
1868{ 1820{