From 113022dbed485bec83b359677874d06230c15edf Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 9 Jul 2010 17:34:12 +0200 Subject: Only try to load wallpaper for iOS 4.0+ --- src/gui.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gui.c') diff --git a/src/gui.c b/src/gui.c index a76034d..0ab2ac7 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1136,6 +1136,7 @@ static void gui_set_wallpaper(const char *wp) static gboolean gui_pages_init_cb(gpointer user_data) { const char *uuid = (const char*)user_data; + uint32_t osversion = 0; GError *error = NULL; plist_t iconstate = NULL; @@ -1147,7 +1148,7 @@ static gboolean gui_pages_init_cb(gpointer user_data) /* connect to sbservices */ if (!sbc) - sbc = device_sbs_new(uuid, &error); + sbc = device_sbs_new(uuid, &osversion, &error); if (error) { g_printerr("%s", error->message); @@ -1156,9 +1157,11 @@ static gboolean gui_pages_init_cb(gpointer user_data) } if (sbc) { - /* Load wallpaper if available */ - if (device_sbs_save_wallpaper(sbc, "/tmp/wallpaper.png", &error)) { - gui_set_wallpaper("/tmp/wallpaper.png"); + if (osversion >= 0x04000000) { + /* Load wallpaper if available */ + if (device_sbs_save_wallpaper(sbc, "/tmp/wallpaper.png", &error)) { + gui_set_wallpaper("/tmp/wallpaper.png"); + } } /* Load icon data */ -- cgit v1.1-32-gdbae