From cbeeb456f15d91434f46f9bcea5ec6f68e217f03 Mon Sep 17 00:00:00 2001 From: Thomas Thurman Date: Wed, 27 May 2009 01:15:08 -0400 Subject: [PATCH 1/1] accelerometer should be optional --- sand.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sand.c b/sand.c index e671d10..7428e88 100644 --- a/sand.c +++ b/sand.c @@ -198,7 +198,7 @@ update_screen (gpointer data) int xstart, xend, xdelta, ystart, yend, ydelta; - if (!dbus_call) + if (!dbus_call && dbus_proxy) dbus_call = dbus_g_proxy_begin_call ( dbus_proxy, "get_device_orientation", @@ -311,7 +311,10 @@ main(int argc, char **argv) "/com/nokia/mce/request", "com.nokia.mce.request", NULL); - g_assert (dbus_proxy); + if (!dbus_proxy) + { + g_warning ("You have no accelerometer installed. Gravity will always be downwards.\n"); + } pixbuf = gdk_pixbuf_new_from_file ("/usr/share/sandcastle/sandcastle.png", NULL); pixels = (guint32*) gdk_pixbuf_get_pixels (pixbuf); -- 1.7.9.5